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

Unified Diff: remoting/client/plugin/pepper_xmpp_proxy.cc

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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/client/plugin/pepper_xmpp_proxy.cc
diff --git a/remoting/client/plugin/pepper_xmpp_proxy.cc b/remoting/client/plugin/pepper_xmpp_proxy.cc
index cfdb842dd620270db0ff517d8b1519dcc06cc690..fb96bd13a3652556f27cbcdacc452fa6b0a1a6c7 100644
--- a/remoting/client/plugin/pepper_xmpp_proxy.cc
+++ b/remoting/client/plugin/pepper_xmpp_proxy.cc
@@ -2,17 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "remoting/client/plugin/pepper_xmpp_proxy.h"
#include "base/message_loop.h"
+#include "base/message_loop_proxy.h"
#include "remoting/client/plugin/chromoting_scriptable_object.h"
#include "remoting/client/plugin/pepper_util.h"
-#include "remoting/client/plugin/pepper_xmpp_proxy.h"
namespace remoting {
PepperXmppProxy::PepperXmppProxy(
base::WeakPtr<ChromotingScriptableObject> scriptable_object,
- MessageLoop* callback_message_loop)
+ base::MessageLoopProxy* callback_message_loop)
: scriptable_object_(scriptable_object),
callback_message_loop_(callback_message_loop) {
CHECK(CurrentlyOnPluginThread());
@@ -22,7 +23,7 @@ PepperXmppProxy::~PepperXmppProxy() {
}
void PepperXmppProxy::AttachCallback(base::WeakPtr<ResponseCallback> callback) {
- CHECK_EQ(callback_message_loop_, MessageLoop::current());
+ DCHECK(callback_message_loop_->BelongsToCurrentThread());
callback_ = callback;
}
@@ -44,7 +45,7 @@ void PepperXmppProxy::SendIq(const std::string& request_xml) {
}
void PepperXmppProxy::OnIq(const std::string& response_xml) {
- if (MessageLoop::current() != callback_message_loop_) {
+ if (!callback_message_loop_->BelongsToCurrentThread()) {
callback_message_loop_->PostTask(
FROM_HERE,NewRunnableMethod(this,
&PepperXmppProxy::OnIq,

Powered by Google App Engine
This is Rietveld 408576698