summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authoranujk.sharma <anujk.sharma@samsung.com>2015-05-05 14:57:29 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 21:58:02 +0000
commitbb802938545822678c2ef22719f80f143f3c093e (patch)
treefb00569925271e03ac4f782a876b0b3885f52ff0 /remoting
parenta8ae6ed4c84efbf4edad065f70a2032464fc2298 (diff)
downloadchromium_src-bb802938545822678c2ef22719f80f143f3c093e.zip
chromium_src-bb802938545822678c2ef22719f80f143f3c093e.tar.gz
chromium_src-bb802938545822678c2ef22719f80f143f3c093e.tar.bz2
Replace MessageLoopProxy usage with ThreadTaskRunnerHandle in remoting module.
MessageLoopProxy is deprecated. This basically does a search and replace: MessageLoopProxy::current() -> ThreadTaskRunnerHandle::Get(). BUG=391045 Review URL: https://codereview.chromium.org/1113493005 Cr-Commit-Position: refs/heads/master@{#328413}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/client/client_status_logger_unittest.cc3
-rw-r--r--remoting/host/client_session.cc5
-rw-r--r--remoting/host/heartbeat_sender.h1
-rw-r--r--remoting/host/host_status_logger_unittest.cc3
-rw-r--r--remoting/host/policy_watcher_unittest.cc8
-rw-r--r--remoting/protocol/clipboard_thread_proxy.h4
6 files changed, 7 insertions, 17 deletions
diff --git a/remoting/client/client_status_logger_unittest.cc b/remoting/client/client_status_logger_unittest.cc
index 0660fdc..5332a9c 100644
--- a/remoting/client/client_status_logger_unittest.cc
+++ b/remoting/client/client_status_logger_unittest.cc
@@ -5,7 +5,6 @@
#include "remoting/client/client_status_logger.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "remoting/client/chromoting_stats.h"
#include "remoting/signaling/mock_signal_strategy.h"
#include "remoting/signaling/server_log_entry_unittest.h"
@@ -68,7 +67,6 @@ class ClientStatusLoggerTest : public testing::Test {
void SetUp() override {
EXPECT_CALL(signal_strategy_, AddListener(_));
EXPECT_CALL(signal_strategy_, RemoveListener(_));
- message_loop_proxy_ = base::MessageLoopProxy::current();
client_status_logger_.reset(
new ClientStatusLogger(ServerLogEntry::ME2ME,
&signal_strategy_,
@@ -77,7 +75,6 @@ class ClientStatusLoggerTest : public testing::Test {
protected:
base::MessageLoop message_loop_;
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockSignalStrategy signal_strategy_;
scoped_ptr<ClientStatusLogger> client_status_logger_;
};
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 10e4d07..d6a02fa 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -6,7 +6,8 @@
#include <algorithm>
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "remoting/base/capabilities.h"
#include "remoting/base/logging.h"
#include "remoting/codec/audio_encoder.h"
@@ -502,7 +503,7 @@ scoped_ptr<protocol::ClipboardStub> ClientSession::CreateClipboardProxy() {
return make_scoped_ptr(
new protocol::ClipboardThreadProxy(client_clipboard_factory_.GetWeakPtr(),
- base::MessageLoopProxy::current()));
+ base::ThreadTaskRunnerHandle::Get()));
}
} // namespace remoting
diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h
index 84a6ad0..162a147 100644
--- a/remoting/host/heartbeat_sender.h
+++ b/remoting/host/heartbeat_sender.h
@@ -18,7 +18,6 @@
#include "remoting/signaling/signal_strategy.h"
namespace base {
-class MessageLoopProxy;
class TimeDelta;
} // namespace base
diff --git a/remoting/host/host_status_logger_unittest.cc b/remoting/host/host_status_logger_unittest.cc
index 0ce904a..86f42af 100644
--- a/remoting/host/host_status_logger_unittest.cc
+++ b/remoting/host/host_status_logger_unittest.cc
@@ -5,7 +5,6 @@
#include "remoting/host/host_status_logger.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
#include "remoting/host/fake_host_status_monitor.h"
#include "remoting/signaling/mock_signal_strategy.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -126,7 +125,6 @@ class HostStatusLoggerTest : public testing::Test {
public:
HostStatusLoggerTest() {}
void SetUp() override {
- message_loop_proxy_ = base::MessageLoopProxy::current();
EXPECT_CALL(signal_strategy_, AddListener(_));
host_status_logger_.reset(
new HostStatusLogger(host_status_monitor_.AsWeakPtr(),
@@ -138,7 +136,6 @@ class HostStatusLoggerTest : public testing::Test {
protected:
base::MessageLoop message_loop_;
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockSignalStrategy signal_strategy_;
scoped_ptr<HostStatusLogger> host_status_logger_;
FakeHostStatusMonitor host_status_monitor_;
diff --git a/remoting/host/policy_watcher_unittest.cc b/remoting/host/policy_watcher_unittest.cc
index 9845828..1d683cb 100644
--- a/remoting/host/policy_watcher_unittest.cc
+++ b/remoting/host/policy_watcher_unittest.cc
@@ -7,8 +7,10 @@
#include "base/json/json_writer.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/mock_log.h"
+#include "base/thread_task_runner_handle.h"
#include "components/policy/core/common/fake_async_policy_loader.h"
#include "policy/policy_constants.h"
#include "remoting/host/dns_blackhole_checker.h"
@@ -63,10 +65,9 @@ class PolicyWatcherTest : public testing::Test {
EXPECT_CALL(mock_policy_callback_, OnPolicyUpdatePtr(testing::_)).Times(0);
EXPECT_CALL(mock_policy_callback_, OnPolicyError()).Times(0);
- message_loop_proxy_ = base::MessageLoopProxy::current();
-
// Retaining a raw pointer to keep control over policy contents.
- policy_loader_ = new policy::FakeAsyncPolicyLoader(message_loop_proxy_);
+ policy_loader_ =
+ new policy::FakeAsyncPolicyLoader(base::ThreadTaskRunnerHandle::Get());
policy_watcher_ =
PolicyWatcher::CreateFromPolicyLoader(make_scoped_ptr(policy_loader_));
@@ -206,7 +207,6 @@ class PolicyWatcherTest : public testing::Test {
static const char* kHostDomain;
static const char* kPortRange;
base::MessageLoop message_loop_;
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockPolicyCallback mock_policy_callback_;
// |policy_loader_| is owned by |policy_watcher_|. PolicyWatcherTest retains
diff --git a/remoting/protocol/clipboard_thread_proxy.h b/remoting/protocol/clipboard_thread_proxy.h
index af68832..bdb654d 100644
--- a/remoting/protocol/clipboard_thread_proxy.h
+++ b/remoting/protocol/clipboard_thread_proxy.h
@@ -12,10 +12,6 @@
#include "base/task_runner.h"
#include "remoting/protocol/clipboard_stub.h"
-namespace base {
-class MessageLoopProxy;
-} // namespace base
-
namespace remoting {
namespace protocol {