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

Unified Diff: blimp/net/tcp_engine_transport.cc

Issue 2034703003: Remove use of deprecated MessageLoop methods in blimp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « blimp/net/stream_packet_writer.cc ('k') | blimp/net/thread_pipe_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/tcp_engine_transport.cc
diff --git a/blimp/net/tcp_engine_transport.cc b/blimp/net/tcp_engine_transport.cc
index 3d016c49365c7db1726a4ae1044d220238871e0a..6375a8deb715e7e2ac6b37586d0cee43d356154e 100644
--- a/blimp/net/tcp_engine_transport.cc
+++ b/blimp/net/tcp_engine_transport.cc
@@ -8,8 +8,10 @@
#include "base/callback.h"
#include "base/callback_helpers.h"
+#include "base/location.h"
#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "blimp/net/stream_socket_connection.h"
#include "net/socket/stream_socket.h"
#include "net/socket/tcp_server_socket.h"
@@ -37,8 +39,8 @@ void TCPEngineTransport::Connect(const net::CompletionCallback& callback) {
int result = server_socket_->Listen(address_, 5);
if (result != net::OK) {
server_socket_.reset();
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, result));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, result));
return;
}
}
@@ -57,8 +59,8 @@ void TCPEngineTransport::Connect(const net::CompletionCallback& callback) {
server_socket_.reset();
}
- base::MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(callback, result));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ base::Bind(callback, result));
}
std::unique_ptr<BlimpConnection> TCPEngineTransport::TakeConnection() {
« no previous file with comments | « blimp/net/stream_packet_writer.cc ('k') | blimp/net/thread_pipe_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698