Chromium Code Reviews| 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(); |
| } |