Chromium Code Reviews| Index: google_apis/gaia/gaia_oauth_client.cc |
| diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc |
| index 56647f465dbe5b7457230c53d98e63f8285447e9..b603189c869f8816aee67930152c0874131cf0ca 100644 |
| --- a/google_apis/gaia/gaia_oauth_client.cc |
| +++ b/google_apis/gaia/gaia_oauth_client.cc |
| @@ -62,6 +62,9 @@ class GaiaOAuthClient::Core |
| void GetTokenInfo(const std::string& oauth_access_token, |
| int max_retries, |
| Delegate* delegate); |
| + void GetTokenHandleInfo(const std::string& token_handle, |
| + int max_retries, |
| + Delegate* delegate); |
| // net::URLFetcherDelegate implementation. |
| void OnURLFetchComplete(const net::URLFetcher* source) override; |
| @@ -203,6 +206,18 @@ void GaiaOAuthClient::Core::GetTokenInfo(const std::string& oauth_access_token, |
| delegate); |
| } |
| +void GaiaOAuthClient::Core::GetTokenHandleInfo(const std::string& token_handle, |
| + int max_retries, |
| + Delegate* delegate) { |
| + DCHECK_EQ(request_type_, NO_PENDING_REQUEST); |
| + DCHECK(!request_.get()); |
| + request_type_ = TOKEN_INFO; |
| + std::string post_body = |
| + "token_handle=" + net::EscapeUrlEncodedData(token_handle, true); |
| + MakeGaiaRequest(GURL(GaiaUrls::GetInstance()->oauth2_token_info_url()), |
| + post_body, max_retries, delegate); |
| +} |
|
Roger Tawa OOO till Jul 10th
2015/03/11 18:23:52
Since Core is an internal only class, and since th
Denis Kuznetsov (DE-MUC)
2015/03/11 19:04:19
Done.
|
| + |
| void GaiaOAuthClient::Core::MakeGaiaRequest( |
| const GURL& url, |
| const std::string& post_body, |
| @@ -399,4 +414,10 @@ void GaiaOAuthClient::GetTokenInfo(const std::string& access_token, |
| return core_->GetTokenInfo(access_token, max_retries, delegate); |
| } |
| +void GaiaOAuthClient::GetTokenHandleInfo(const std::string& token_handle, |
| + int max_retries, |
| + Delegate* delegate) { |
| + return core_->GetTokenInfo(token_handle, max_retries, delegate); |
| +} |
| + |
| } // namespace gaia |