Index: google_apis/gaia/gaia_auth_fetcher.h |
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h |
index 9c877b6eb78809e2d97eb262b7cb99c533722034..f833c6c643a42bdc13503bf98850e1f14463b7cf 100644 |
--- a/google_apis/gaia/gaia_auth_fetcher.h |
+++ b/google_apis/gaia/gaia_auth_fetcher.h |
@@ -98,12 +98,32 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate { |
// Resulting refresh token is annotated on the server with |device_id|. Format |
// of device_id on the server is at most 64 unicode characters. |
// |
- // Either OnClientOAuthSuccess or OnClientOAuthFailure will be |
- // called on the consumer on the original thread. |
+ // Either both OnClientOAuthCode and OnClientOAuthSuccess or |
+ // OnClientOAuthFailure with optional OnClientOAuthCode will be called on the |
+ // consumer on the original thread. |
void StartCookieForOAuthLoginTokenExchangeWithDeviceId( |
const std::string& session_index, |
const std::string& device_id); |
+ // Start a request to exchange the cookies of a signed-in user session |
+ // and for specified client for an OAuthLogin-scoped oauth2 token. Client is |
+ // determined by its |client_id|. In the case of a session with multiple |
+ // accounts signed in, |session_index| indicate the which of accounts |
+ // within the session. If |fetch_token_from_auth_code| is not set fetching |
+ // process stops after receiving an auth code and ClientOAuthSuccess won't be |
+ // called. |
+ // Resulting refresh token is annotated on the server with |device_id|. Format |
+ // of device_id on the server is at most 64 unicode characters. |
+ // |
+ // Either OnClientOAuthCode with optional ClientOAuthSuccess or |
+ // OnClientOAuthFailure with optional OnClientOAuthCode will be called on the |
+ // consumer on the original thread. |
+ void StartCookieForOAuthLoginTokenExchangeWithClientIdAndDeviceId( |
+ bool fetch_token_from_auth_code, |
+ const std::string& session_index, |
+ const std::string& client_id, |
+ const std::string& device_id); |
+ |
// Start a request to exchange the authorization code for an OAuthLogin-scoped |
// oauth2 token. |
// |
@@ -433,6 +453,7 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate { |
std::string request_body_; |
std::string requested_service_; |
bool fetch_pending_; |
+ bool fetch_token_from_auth_code_; |
// Headers used during the Logout call. |
std::string logout_headers_; |