summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/fake_session.h
diff options
context:
space:
mode:
authorlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 02:25:27 +0000
committerlambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-24 02:25:27 +0000
commit9241e6b6807d0528f6252d5b840e26862796c962 (patch)
tree78a2fd2583b09006799e84c4a2f16bf5d55d798e /remoting/protocol/fake_session.h
parenta870d2b92a31fd6d7915ad450fee4bd323e17e36 (diff)
downloadchromium_src-9241e6b6807d0528f6252d5b840e26862796c962.zip
chromium_src-9241e6b6807d0528f6252d5b840e26862796c962.tar.gz
chromium_src-9241e6b6807d0528f6252d5b840e26862796c962.tar.bz2
Trampoline MessageReader::OnMessageDone() to correct thread.
This ensures that all socket operations occur on one thread, even when MessageReader::message_received_callback_ punts its Task parameter onto another thread. Fixes a Host plugin crash on Linux during a remote desktop session. In this case, the problem was caused by EventExecutorLinux::Inject{Key|Mouse}Event() doing the injection and the "done" task on a different thread. BUG=None TEST=Unit-test: MessageReaderTest.UseSocketOnCorrectThread Review URL: http://codereview.chromium.org/7695010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/fake_session.h')
-rw-r--r--remoting/protocol/fake_session.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index e89a208..13409d0 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -73,6 +73,8 @@ class FakeSocket : public net::StreamSocket {
net::BoundNetLog net_log_;
+ MessageLoop* message_loop_;
+
DISALLOW_COPY_AND_ASSIGN(FakeSocket);
};
@@ -110,6 +112,8 @@ class FakeUdpSocket : public net::Socket {
std::vector<std::string> input_packets_;
int input_pos_;
+ MessageLoop* message_loop_;
+
DISALLOW_COPY_AND_ASSIGN(FakeUdpSocket);
};