Chromium Code Reviews| Index: remoting/host/signaling_connector.cc |
| diff --git a/remoting/host/signaling_connector.cc b/remoting/host/signaling_connector.cc |
| index 072eced53f3ff783ee2be1834f669aedadbbedcf..6457f5ffe077cd9e335229c2b8fca1ff843f4f3b 100644 |
| --- a/remoting/host/signaling_connector.cc |
| +++ b/remoting/host/signaling_connector.cc |
| @@ -93,11 +93,20 @@ void SignalingConnector::OnOnlineStateChanged(bool online) { |
| } |
| } |
| -void SignalingConnector::OnRefreshTokenResponse(const std::string& access_token, |
| +void SignalingConnector::OnRefreshTokenResponse(const std::string& email, |
| + const std::string& access_token, |
| int expires_seconds) { |
| DCHECK(CalledOnValidThread()); |
| DCHECK(oauth_credentials_.get()); |
| LOG(INFO) << "Received OAuth token."; |
| + |
| + if (email != oauth_credentials_->login) { |
| + LOG(ERROR) << "User email doesn't match expected value. " |
| + "The OAuth token was issued for a different account."; |
|
Wez
2012/05/16 23:00:07
Suggest "OAuth token and email address do not refe
Sergey Ulanov
2012/05/17 00:38:11
Done.
|
| + auth_failed_callback_.Run(); |
| + return; |
| + } |
| + |
| refreshing_oauth_token_ = false; |
| auth_token_expiry_time_ = base::Time::Now() + |
| base::TimeDelta::FromSeconds(expires_seconds) - |