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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 2405273002: Remove MessageLoop::current() from socket_host_tcp.cc. (Closed)
Patch Set: Created 4 years, 2 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 | « content/browser/renderer_host/p2p/socket_host_tcp.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index 252026400e0f2cdd370fd4b719fcf14d7a44390a..039c619ccf45ebe68b58ffca31c0c5a50b419fd7 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -10,6 +10,7 @@
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/sys_byteorder.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "content/common/p2p_messages.h"
#include "ipc/ipc_sender.h"
#include "jingle/glue/fake_ssl_client_socket.h"
@@ -122,9 +123,7 @@ bool P2PSocketHostTcpBase::Init(const net::IPEndPoint& local_address,
// directly here as the caller may not expect an error/close to
// happen here. This is okay, as from the caller's point of view,
// the connect always happens asynchronously.
- base::MessageLoop* message_loop = base::MessageLoop::current();
- CHECK(message_loop);
- message_loop->task_runner()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&P2PSocketHostTcpBase::OnConnected,
base::Unretained(this), status));
}
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698