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

Unified Diff: jingle/notifier/base/xmpp_connection.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 | « jingle/glue/proxy_resolving_client_socket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/xmpp_connection.cc
diff --git a/jingle/notifier/base/xmpp_connection.cc b/jingle/notifier/base/xmpp_connection.cc
index d50adb027451839babb5e6ca53ac8519cc977603..efa62bca796932cfcfe31fadb47095de279b273e 100644
--- a/jingle/notifier/base/xmpp_connection.cc
+++ b/jingle/notifier/base/xmpp_connection.cc
@@ -8,8 +8,8 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/string_piece.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "jingle/glue/chrome_async_socket.h"
#include "jingle/glue/task_pump.h"
#include "jingle/glue/xmpp_client_socket_factory.h"
@@ -82,13 +82,12 @@ XmppConnection::~XmppConnection() {
DCHECK(CalledOnValidThread());
ClearClient();
task_pump_->Stop();
- base::MessageLoop* current_message_loop = base::MessageLoop::current();
- CHECK(current_message_loop);
// We do this because XmppConnection may get destroyed as a result
// of a signal from XmppClient. If we delete |task_pump_| here, bad
// things happen when the stack pops back up to the XmppClient's
// (which is deleted by |task_pump_|) function.
- current_message_loop->DeleteSoon(FROM_HERE, task_pump_.release());
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE,
+ task_pump_.release());
}
void XmppConnection::OnStateChange(buzz::XmppEngine::State state) {
« no previous file with comments | « jingle/glue/proxy_resolving_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698