Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: google_apis/gaia/gaia_auth_fetcher.h

Issue 1644713002: Allow gaia auth fetcher to work with arbitrary clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gaia/gaia_auth_consumer.h ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b477913bd5f6c5c6b9e22b0e2b0f49edfbffc5b4 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -104,6 +104,24 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
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 or ClientOAuthSuccess or OnClientOAuthFailure
+ // will be called on the consumer on the original thread.
+ void StartCookieForOAuthLoginTokenExchange(
+ 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.
//
@@ -432,7 +450,8 @@ class GaiaAuthFetcher : public net::URLFetcherDelegate {
GURL client_login_to_oauth2_gurl_;
std::string request_body_;
std::string requested_service_;
- bool fetch_pending_;
+ bool fetch_pending_ = false;
+ bool fetch_token_from_auth_code_ = false;
// Headers used during the Logout call.
std::string logout_headers_;
« no previous file with comments | « google_apis/gaia/gaia_auth_consumer.h ('k') | google_apis/gaia/gaia_auth_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698