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

Unified Diff: chrome/test/chromedriver/net/test_http_server.cc

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 years, 6 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
Index: chrome/test/chromedriver/net/test_http_server.cc
diff --git a/chrome/test/chromedriver/net/test_http_server.cc b/chrome/test/chromedriver/net/test_http_server.cc
index 6b8a4bcf4c12f37d3e21a513b80f45df0760c649..a3d8e38dcbadbd92c80d77b36457c3e61695ec02 100644
--- a/chrome/test/chromedriver/net/test_http_server.cc
+++ b/chrome/test/chromedriver/net/test_http_server.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "net/base/ip_endpoint.h"
@@ -36,10 +36,9 @@ bool TestHttpServer::Start() {
return false;
bool success;
base::WaitableEvent event(false, false);
- thread_.message_loop_proxy()->PostTask(
- FROM_HERE,
- base::Bind(&TestHttpServer::StartOnServerThread,
- base::Unretained(this), &success, &event));
+ thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&TestHttpServer::StartOnServerThread,
+ base::Unretained(this), &success, &event));
event.Wait();
return success;
}
@@ -48,10 +47,9 @@ void TestHttpServer::Stop() {
if (!thread_.IsRunning())
return;
base::WaitableEvent event(false, false);
- thread_.message_loop_proxy()->PostTask(
- FROM_HERE,
- base::Bind(&TestHttpServer::StopOnServerThread,
- base::Unretained(this), &event));
+ thread_.task_runner()->PostTask(
+ FROM_HERE, base::Bind(&TestHttpServer::StopOnServerThread,
+ base::Unretained(this), &event));
event.Wait();
thread_.Stop();
}
« no previous file with comments | « chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc ('k') | chrome/test/chromedriver/net/websocket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698