Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: remoting/host/policy_watcher_unittest.cc

Issue 1113493005: [remoting] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_status_logger_unittest.cc ('k') | remoting/protocol/clipboard_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/policy_watcher_unittest.cc
diff --git a/remoting/host/policy_watcher_unittest.cc b/remoting/host/policy_watcher_unittest.cc
index 98458283f536c83ca829adec985fa76c0f27dc74..1d683cbc51e66b31aed1e149e82655de1f5c3ddf 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
« no previous file with comments | « remoting/host/host_status_logger_unittest.cc ('k') | remoting/protocol/clipboard_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698