Chromium Code Reviews| Index: remoting/host/setup/gaia_oauth_client.cc |
| diff --git a/remoting/host/setup/oauth_client.cc b/remoting/host/setup/gaia_oauth_client.cc |
| similarity index 77% |
| rename from remoting/host/setup/oauth_client.cc |
| rename to remoting/host/setup/gaia_oauth_client.cc |
| index 684ab2c2d84e4cdc99b3424bdf5a62a7d0a5196d..27f48b6ffff13430d672e29b200001f8b2dff66c 100644 |
| --- a/remoting/host/setup/oauth_client.cc |
| +++ b/remoting/host/setup/gaia_oauth_client.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "remoting/host/setup/oauth_client.h" |
| +#include "remoting/host/setup/gaia_oauth_client.h" |
| #include "base/logging.h" |
| @@ -12,15 +12,15 @@ const int kMaxGaiaRetries = 3; |
| namespace remoting { |
| -OAuthClient::OAuthClient( |
| +GaiaOAuthClient::GaiaOAuthClient( |
| scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) |
| : gaia_oauth_client_(url_request_context_getter.get()) { |
| } |
| -OAuthClient::~OAuthClient() { |
| +GaiaOAuthClient::~GaiaOAuthClient() { |
| } |
| -void OAuthClient::GetCredentialsFromAuthCode( |
| +void GaiaOAuthClient::GetCredentialsFromAuthCode( |
| const gaia::OAuthClientInfo& oauth_client_info, |
| const std::string& auth_code, |
| CompletionCallback on_done) { |
| @@ -36,7 +36,7 @@ void OAuthClient::GetCredentialsFromAuthCode( |
| kMaxGaiaRetries, this); |
| } |
| -void OAuthClient::OnGetTokensResponse( |
| +void GaiaOAuthClient::OnGetTokensResponse( |
| const std::string& refresh_token, |
| const std::string& access_token, |
| int expires_in_seconds) { |
| @@ -45,15 +45,16 @@ void OAuthClient::OnGetTokensResponse( |
| gaia_oauth_client_.GetUserEmail(access_token, kMaxGaiaRetries, this); |
| } |
| -void OAuthClient::OnRefreshTokenResponse( |
| +void GaiaOAuthClient::OnRefreshTokenResponse( |
| const std::string& access_token, |
| int expires_in_seconds) { |
| // We never request a refresh token, so this call is not expected. |
| NOTREACHED(); |
| } |
| -void OAuthClient::SendResponse(const std::string& user_email, |
| - const std::string& refresh_token) { |
| +void GaiaOAuthClient::SendResponse( |
| + const std::string& user_email, |
|
Lambros
2015/04/24 21:38:56
Don't need to change formatting - the old formatti
John Williams
2015/04/24 21:48:42
Done.
|
| + const std::string& refresh_token) { |
| CompletionCallback on_done = on_done_; |
| on_done_.Reset(); |
| on_done.Run(user_email, refresh_token); |
| @@ -68,19 +69,19 @@ void OAuthClient::SendResponse(const std::string& user_email, |
| } |
| } |
| -void OAuthClient::OnGetUserEmailResponse(const std::string& user_email) { |
| +void GaiaOAuthClient::OnGetUserEmailResponse(const std::string& user_email) { |
| SendResponse(user_email, refresh_token_); |
| } |
| -void OAuthClient::OnOAuthError() { |
| +void GaiaOAuthClient::OnOAuthError() { |
| SendResponse("", ""); |
| } |
| -void OAuthClient::OnNetworkError(int response_code) { |
| +void GaiaOAuthClient::OnNetworkError(int response_code) { |
| SendResponse("", ""); |
| } |
| -OAuthClient::Request::Request( |
| +GaiaOAuthClient::Request::Request( |
| const gaia::OAuthClientInfo& oauth_client_info, |
| const std::string& auth_code, |
| CompletionCallback on_done) { |
| @@ -89,7 +90,7 @@ OAuthClient::Request::Request( |
| this->on_done = on_done; |
| } |
| -OAuthClient::Request::~Request() { |
| +GaiaOAuthClient::Request::~Request() { |
| } |
| } // namespace remoting |