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

Unified Diff: remoting/host/it2me/it2me_native_messaging_host_unittest.cc

Issue 2380463005: It2Me Host cleanup - Remove task_runner_ (Closed)
Patch Set: Removing unused header file Created 4 years, 3 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/it2me/it2me_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_native_messaging_host_unittest.cc
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
index f43d58c8c5d59f162d42ccecc736fa59ba14260e..b8423b783e6f717d10e99419409a4241efa581c5 100644
--- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
@@ -151,7 +151,6 @@ class MockIt2MeHost : public It2MeHost {
void MockIt2MeHost::Connect() {
if (!host_context()->ui_task_runner()->BelongsToCurrentThread()) {
- DCHECK(task_runner()->BelongsToCurrentThread());
host_context()->ui_task_runner()->PostTask(
FROM_HERE, base::Bind(&MockIt2MeHost::Connect, this));
return;
@@ -163,27 +162,23 @@ void MockIt2MeHost::Connect() {
std::string access_code(kTestAccessCode);
base::TimeDelta lifetime =
base::TimeDelta::FromSeconds(kTestAccessCodeLifetimeInSeconds);
- task_runner()->PostTask(FROM_HERE,
- base::Bind(&It2MeHost::Observer::OnStoreAccessCode,
- observer(),
- access_code,
- lifetime));
+ host_context()->ui_task_runner()->PostTask(
+ FROM_HERE, base::Bind(&It2MeHost::Observer::OnStoreAccessCode, observer(),
+ access_code, lifetime));
RunSetState(kReceivedAccessCode);
std::string client_username(kTestClientUsername);
- task_runner()->PostTask(
- FROM_HERE,
- base::Bind(&It2MeHost::Observer::OnClientAuthenticated,
- observer(),
- client_username));
+ host_context()->ui_task_runner()->PostTask(
+ FROM_HERE, base::Bind(&It2MeHost::Observer::OnClientAuthenticated,
+ observer(), client_username));
RunSetState(kConnected);
}
void MockIt2MeHost::Disconnect() {
if (!host_context()->network_task_runner()->BelongsToCurrentThread()) {
- DCHECK(task_runner()->BelongsToCurrentThread());
+ DCHECK(host_context()->ui_task_runner()->BelongsToCurrentThread());
host_context()->network_task_runner()->PostTask(
FROM_HERE, base::Bind(&MockIt2MeHost::Disconnect, this));
return;
« no previous file with comments | « remoting/host/it2me/it2me_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698