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

Unified Diff: jingle/glue/proxy_resolving_client_socket.cc

Issue 2088433002: Remove calls to MessageLoop::current() in jingle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 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
« no previous file with comments | « no previous file | jingle/notifier/base/xmpp_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/proxy_resolving_client_socket.cc
diff --git a/jingle/glue/proxy_resolving_client_socket.cc b/jingle/glue/proxy_resolving_client_socket.cc
index 9e3e61350608f235b265c03cd14b80ec8dc2e0be..24a81bd78ad92d46c0e196108cdbe6ce571a9f90 100644
--- a/jingle/glue/proxy_resolving_client_socket.cc
+++ b/jingle/glue/proxy_resolving_client_socket.cc
@@ -11,6 +11,7 @@
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "net/base/io_buffer.h"
#include "net/base/ip_address.h"
#include "net/base/load_flags.h"
@@ -149,9 +150,7 @@ int ProxyResolvingClientSocket::Connect(
// We defer execution of ProcessProxyResolveDone instead of calling it
// directly here for simplicity. From the caller's point of view,
// the connect always happens asynchronously.
- base::MessageLoop* message_loop = base::MessageLoop::current();
- CHECK(message_loop);
- message_loop->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
weak_factory_.GetWeakPtr(), status));
@@ -305,9 +304,7 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) {
// In both cases we want to post ProcessProxyResolveDone (in the error case
// we might still want to fall back a direct connection).
if (rv != net::ERR_IO_PENDING) {
- base::MessageLoop* message_loop = base::MessageLoop::current();
- CHECK(message_loop);
- message_loop->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone,
weak_factory_.GetWeakPtr(), rv));
« no previous file with comments | « no previous file | jingle/notifier/base/xmpp_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698