From edd685f15dfd2841aaeddab567aea0623db1ae69 Mon Sep 17 00:00:00 2001 From: "nduca@chromium.org" Date: Mon, 15 Aug 2011 20:33:46 +0000 Subject: Add MessageLoopProxy::current Review URL: http://codereview.chromium.org/7583053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96819 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/chromoting_host_unittest.cc | 2 +- remoting/host/heartbeat_sender_unittest.cc | 6 +++--- remoting/host/host_key_pair_unittest.cc | 2 +- remoting/host/json_host_config_unittest.cc | 2 +- remoting/host/screen_recorder_unittest.cc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'remoting/host') diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc index d37f79f..129d922 100644 --- a/remoting/host/chromoting_host_unittest.cc +++ b/remoting/host/chromoting_host_unittest.cc @@ -69,7 +69,7 @@ class ChromotingHostTest : public testing::Test { } virtual void SetUp() OVERRIDE { - message_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread(); + message_loop_proxy_ = base::MessageLoopProxy::current(); config_ = new InMemoryHostConfig(); ON_CALL(context_, main_message_loop()) .WillByDefault(Return(&message_loop_)); diff --git a/remoting/host/heartbeat_sender_unittest.cc b/remoting/host/heartbeat_sender_unittest.cc index bf42d25..8818c156 100644 --- a/remoting/host/heartbeat_sender_unittest.cc +++ b/remoting/host/heartbeat_sender_unittest.cc @@ -59,7 +59,7 @@ TEST_F(HeartbeatSenderTest, DoSendStanza) { EXPECT_CALL(*iq_request, set_callback(_)).Times(1); scoped_ptr heartbeat_sender( - new HeartbeatSender(base::MessageLoopProxy::CreateForCurrentThread(), + new HeartbeatSender(base::MessageLoopProxy::current(), config_)); ASSERT_TRUE(heartbeat_sender->Init()); @@ -79,7 +79,7 @@ TEST_F(HeartbeatSenderTest, DoSendStanza) { // Validate format of the heartbeat stanza. TEST_F(HeartbeatSenderTest, CreateHeartbeatMessage) { scoped_ptr heartbeat_sender( - new HeartbeatSender(base::MessageLoopProxy::CreateForCurrentThread(), + new HeartbeatSender(base::MessageLoopProxy::current(), config_)); ASSERT_TRUE(heartbeat_sender->Init()); @@ -131,7 +131,7 @@ TEST_F(HeartbeatSenderTest, ProcessResponse) { set_interval->AddText(base::IntToString(kTestInterval)); scoped_ptr heartbeat_sender( - new HeartbeatSender(base::MessageLoopProxy::CreateForCurrentThread(), + new HeartbeatSender(base::MessageLoopProxy::current(), config_)); heartbeat_sender->ProcessResponse(response.get()); diff --git a/remoting/host/host_key_pair_unittest.cc b/remoting/host/host_key_pair_unittest.cc index f479f54..ec4fc38 100644 --- a/remoting/host/host_key_pair_unittest.cc +++ b/remoting/host/host_key_pair_unittest.cc @@ -36,7 +36,7 @@ class HostKeyPairTest : public testing::Test { ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); FilePath config_path = test_dir_.path().AppendASCII("test_config.json"); config_ = new JsonHostConfig( - config_path, base::MessageLoopProxy::CreateForCurrentThread()); + config_path, base::MessageLoopProxy::current()); } MessageLoop message_loop_; diff --git a/remoting/host/json_host_config_unittest.cc b/remoting/host/json_host_config_unittest.cc index 5a59311..3184f75 100644 --- a/remoting/host/json_host_config_unittest.cc +++ b/remoting/host/json_host_config_unittest.cc @@ -27,7 +27,7 @@ const char* kTestConfig = class JsonHostConfigTest : public testing::Test { protected: virtual void SetUp() { - message_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread(); + message_loop_proxy_ = base::MessageLoopProxy::current(); } static void WriteTestFile(const FilePath& filename) { diff --git a/remoting/host/screen_recorder_unittest.cc b/remoting/host/screen_recorder_unittest.cc index 0af77f1..f501a62 100644 --- a/remoting/host/screen_recorder_unittest.cc +++ b/remoting/host/screen_recorder_unittest.cc @@ -83,7 +83,7 @@ class ScreenRecorderTest : public testing::Test { record_ = new ScreenRecorder( &message_loop_, &message_loop_, - base::MessageLoopProxy::CreateForCurrentThread(), + base::MessageLoopProxy::current(), &capturer_, encoder_); } -- cgit v1.1