OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/signaling_connector.h" | 5 #include "remoting/host/signaling_connector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "remoting/host/chromoting_host_context.h" | 9 #include "remoting/host/chromoting_host_context.h" |
10 #include "remoting/host/url_request_context.h" | 10 #include "remoting/host/url_request_context.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // If authentication failed then we have an invalid OAuth token, | 73 // If authentication failed then we have an invalid OAuth token, |
74 // inform the upper layer about it. | 74 // inform the upper layer about it. |
75 if (signal_strategy_->GetError() == SignalStrategy::AUTHENTICATION_FAILED) { | 75 if (signal_strategy_->GetError() == SignalStrategy::AUTHENTICATION_FAILED) { |
76 auth_failed_callback_.Run(); | 76 auth_failed_callback_.Run(); |
77 } else { | 77 } else { |
78 ScheduleTryReconnect(); | 78 ScheduleTryReconnect(); |
79 } | 79 } |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
| 83 bool SignalingConnector::OnSignalStrategyIncomingStanza( |
| 84 const buzz::XmlElement* stanza) { |
| 85 return false; |
| 86 } |
| 87 |
83 void SignalingConnector::OnIPAddressChanged() { | 88 void SignalingConnector::OnIPAddressChanged() { |
84 DCHECK(CalledOnValidThread()); | 89 DCHECK(CalledOnValidThread()); |
85 LOG(INFO) << "IP address has changed."; | 90 LOG(INFO) << "IP address has changed."; |
86 ResetAndTryReconnect(); | 91 ResetAndTryReconnect(); |
87 } | 92 } |
88 | 93 |
89 void SignalingConnector::OnConnectionTypeChanged( | 94 void SignalingConnector::OnConnectionTypeChanged( |
90 net::NetworkChangeNotifier::ConnectionType type) { | 95 net::NetworkChangeNotifier::ConnectionType type) { |
91 DCHECK(CalledOnValidThread()); | 96 DCHECK(CalledOnValidThread()); |
92 if (type != net::NetworkChangeNotifier::CONNECTION_NONE) { | 97 if (type != net::NetworkChangeNotifier::CONNECTION_NONE) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 LOG(INFO) << "Refreshing OAuth token."; | 181 LOG(INFO) << "Refreshing OAuth token."; |
177 DCHECK(!refreshing_oauth_token_); | 182 DCHECK(!refreshing_oauth_token_); |
178 | 183 |
179 refreshing_oauth_token_ = true; | 184 refreshing_oauth_token_ = true; |
180 gaia_oauth_client_->RefreshToken( | 185 gaia_oauth_client_->RefreshToken( |
181 oauth_credentials_->client_info, | 186 oauth_credentials_->client_info, |
182 oauth_credentials_->refresh_token, this); | 187 oauth_credentials_->refresh_token, this); |
183 } | 188 } |
184 | 189 |
185 } // namespace remoting | 190 } // namespace remoting |
OLD | NEW |