Add thread checks to the IPC channel.

Almost every method of the IPC channel must be invoked
from a single thread. This adds the corresponding
DCHECKS, and should confirm bug 6489 as a cause of
flakiness on the UI tests.

BUG: 6489.

Review URL: http://codereview.chromium.org/19617

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8837 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/ipc_channel_win.h b/chrome/common/ipc_channel_win.h
index fcd8abe8..2a601e191 100644
--- a/chrome/common/ipc_channel_win.h
+++ b/chrome/common/ipc_channel_win.h
@@ -12,6 +12,8 @@
 
 #include "base/message_loop.h"
 
+class NonThreadSafe;
+
 namespace IPC {
 
 class Channel::ChannelImpl : public MessageLoopForIO::IOHandler {
@@ -73,6 +75,8 @@
 
   ScopedRunnableMethodFactory<ChannelImpl> factory_;
 
+  scoped_ptr<NonThreadSafe> thread_check_;
+
   DISALLOW_COPY_AND_ASSIGN(ChannelImpl);
 };