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

Unified Diff: remoting/jingle_glue/iq_sender.cc

Issue 10830017: Don't use MessageLoop and MessageLoopProxy in remoting/jingle_glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: remoting/jingle_glue/iq_sender.cc
diff --git a/remoting/jingle_glue/iq_sender.cc b/remoting/jingle_glue/iq_sender.cc
index 797db2af1d3eaebc4cb5bacadfec71fd4dc217fc..aa88ec70caa77d629692f212a173975390bcd44b 100644
--- a/remoting/jingle_glue/iq_sender.cc
+++ b/remoting/jingle_glue/iq_sender.cc
@@ -8,8 +8,9 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/string_number_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time.h"
#include "remoting/jingle_glue/signal_strategy.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
@@ -145,9 +146,8 @@ IqRequest::~IqRequest() {
}
void IqRequest::SetTimeout(base::TimeDelta timeout) {
- base::MessageLoopProxy::current()->PostDelayedTask(
- FROM_HERE, base::Bind(&IqRequest::OnTimeout, AsWeakPtr()),
- timeout);
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&IqRequest::OnTimeout, AsWeakPtr()), timeout);
}
void IqRequest::CallCallback(const buzz::XmlElement* stanza) {
@@ -166,7 +166,7 @@ void IqRequest::OnResponse(const buzz::XmlElement* stanza) {
// It's unsafe to delete signal strategy here, and the callback may
// want to do that, so we post task to invoke the callback later.
scoped_ptr<buzz::XmlElement> stanza_copy(new buzz::XmlElement(*stanza));
- base::MessageLoopProxy::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::Bind(&IqRequest::DeliverResponse, AsWeakPtr(),
base::Passed(&stanza_copy)));
}
« remoting/jingle_glue/fake_signal_strategy.cc ('K') | « remoting/jingle_glue/fake_signal_strategy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698