summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-15 20:33:46 +0000
commitedd685f15dfd2841aaeddab567aea0623db1ae69 (patch)
tree9caa53e84eb2787471dd16009daf02fb85f8890e /remoting
parent5b79e5250785613d6dc7a42a27a45bb44b9cf7a0 (diff)
downloadchromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.zip
chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.gz
chromium_src-edd685f15dfd2841aaeddab567aea0623db1ae69.tar.bz2
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
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/chromoting_host_unittest.cc2
-rw-r--r--remoting/host/heartbeat_sender_unittest.cc6
-rw-r--r--remoting/host/host_key_pair_unittest.cc2
-rw-r--r--remoting/host/json_host_config_unittest.cc2
-rw-r--r--remoting/host/screen_recorder_unittest.cc2
-rw-r--r--remoting/jingle_glue/jingle_thread.cc2
-rw-r--r--remoting/protocol/connection_to_client_unittest.cc2
-rw-r--r--remoting/protocol/jingle_session_unittest.cc4
-rw-r--r--remoting/protocol/protocol_mock_objects.cc2
-rw-r--r--remoting/protocol/rtp_video_reader_unittest.cc4
-rw-r--r--remoting/protocol/rtp_video_writer_unittest.cc4
11 files changed, 16 insertions, 16 deletions
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<HeartbeatSender> 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<HeartbeatSender> 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<HeartbeatSender> 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_);
}
diff --git a/remoting/jingle_glue/jingle_thread.cc b/remoting/jingle_glue/jingle_thread.cc
index 2dc37ad..1999506 100644
--- a/remoting/jingle_glue/jingle_thread.cc
+++ b/remoting/jingle_glue/jingle_thread.cc
@@ -154,7 +154,7 @@ void JingleThread::Start() {
void JingleThread::Run() {
JingleThreadMessageLoop message_loop(this);
message_loop_ = &message_loop;
- message_loop_proxy_ = base::MessageLoopProxy::CreateForCurrentThread();
+ message_loop_proxy_ = base::MessageLoopProxy::current();
TaskPump task_pump;
task_pump_ = &task_pump;
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index f6c9321..4199a02 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -30,7 +30,7 @@ class ConnectionToClientTest : public testing::Test {
// Allocate a ClientConnection object with the mock objects.
viewer_ = new ConnectionToClient(
- base::MessageLoopProxy::CreateForCurrentThread(), &handler_);
+ base::MessageLoopProxy::current(), &handler_);
viewer_->set_host_stub(&host_stub_);
viewer_->set_input_stub(&input_stub_);
viewer_->Init(session_);
diff --git a/remoting/protocol/jingle_session_unittest.cc b/remoting/protocol/jingle_session_unittest.cc
index 074e7c60..28b3081 100644
--- a/remoting/protocol/jingle_session_unittest.cc
+++ b/remoting/protocol/jingle_session_unittest.cc
@@ -178,7 +178,7 @@ class JingleSessionTest : public testing::Test {
EXPECT_CALL(host_server_listener_, OnSessionManagerInitialized())
.Times(1);
host_server_.reset(JingleSessionManager::CreateNotSandboxed(
- base::MessageLoopProxy::CreateForCurrentThread()));
+ base::MessageLoopProxy::current()));
host_server_->set_allow_local_ips(true);
host_server_->Init(
kHostJid, host_signal_strategy_.get(), &host_server_listener_,
@@ -187,7 +187,7 @@ class JingleSessionTest : public testing::Test {
EXPECT_CALL(client_server_listener_, OnSessionManagerInitialized())
.Times(1);
client_server_.reset(JingleSessionManager::CreateNotSandboxed(
- base::MessageLoopProxy::CreateForCurrentThread()));
+ base::MessageLoopProxy::current()));
client_server_->set_allow_local_ips(true);
client_server_->Init(
kClientJid, client_signal_strategy_.get(), &client_server_listener_,
diff --git a/remoting/protocol/protocol_mock_objects.cc b/remoting/protocol/protocol_mock_objects.cc
index 34766c3..3ce8d31 100644
--- a/remoting/protocol/protocol_mock_objects.cc
+++ b/remoting/protocol/protocol_mock_objects.cc
@@ -13,7 +13,7 @@ MockConnectionToClient::MockConnectionToClient(
EventHandler* handler,
HostStub* host_stub,
InputStub* input_stub)
- : ConnectionToClient(base::MessageLoopProxy::CreateForCurrentThread(),
+ : ConnectionToClient(base::MessageLoopProxy::current(),
handler) {
set_host_stub(host_stub);
set_input_stub(input_stub);
diff --git a/remoting/protocol/rtp_video_reader_unittest.cc b/remoting/protocol/rtp_video_reader_unittest.cc
index da5b5ca..8c70b3e9 100644
--- a/remoting/protocol/rtp_video_reader_unittest.cc
+++ b/remoting/protocol/rtp_video_reader_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -67,7 +67,7 @@ class RtpVideoReaderTest : public testing::Test,
void Reset() {
session_.reset(new FakeSession());
reader_.reset(new RtpVideoReader(
- base::MessageLoopProxy::CreateForCurrentThread()));
+ base::MessageLoopProxy::current()));
reader_->Init(session_.get(), this,
base::Bind(&RtpVideoReaderTest::OnReaderInitialized,
base::Unretained(this)));
diff --git a/remoting/protocol/rtp_video_writer_unittest.cc b/remoting/protocol/rtp_video_writer_unittest.cc
index 0fe86e4c..e80d4fb 100644
--- a/remoting/protocol/rtp_video_writer_unittest.cc
+++ b/remoting/protocol/rtp_video_writer_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -59,7 +59,7 @@ class RtpVideoWriterTest : public testing::Test {
};
RtpVideoWriterTest()
- : writer_(base::MessageLoopProxy::CreateForCurrentThread()) {
+ : writer_(base::MessageLoopProxy::current()) {
}
virtual void SetUp() {