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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10081025: Call XmppSignalStrategy::SetAuthInfo() on the right thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index ac73694660d408e45a75c0009b075984a1ac5219..f380056afb27e437f1d868d7faff9107857b3db9 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -148,6 +148,8 @@ class HostProcess : public OAuthClient::Delegate {
// handle it directly, so refresh it asynchronously. A task will be
// posted on the message loop to start watching the NAT policy when
// the access token is available.
+ //
+ // TODO(sergeyu): Move this code to SignalingConnector.
oauth_client_.Start(oauth_refresh_token_, this,
message_loop_.message_loop_proxy());
} else {
@@ -173,8 +175,11 @@ class HostProcess : public OAuthClient::Delegate {
// next time it calls Connect. If not, then this is the initial token
// exchange, so proceed to the next stage of connection.
if (signal_strategy_.get()) {
- signal_strategy_->SetAuthInfo(xmpp_login_, xmpp_auth_token_,
- xmpp_auth_service_);
+ context_->network_message_loop()->PostTask(
+ FROM_HERE, base::Bind(
+ &XmppSignalStrategy::SetAuthInfo,
+ base::Unretained(signal_strategy_.get()),
Wez 2012/04/13 22:40:52 Looks like ChromotingContext gets torn down after
Jamie 2012/04/13 22:41:08 I think there's a race condition here. signal_stra
Sergey Ulanov 2012/04/13 23:43:50 Yes, I realize this may be unsafe, but we never ne
+ xmpp_login_, xmpp_auth_token_, xmpp_auth_service_));
} else {
StartWatchingNatPolicy();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698