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

Unified Diff: chrome/browser/chromeos/login/signin/oauth2_login_manager.h

Issue 1097663003: Fetch OAuth2 tokens prior to profile creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove logging Created 5 years, 8 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
Index: chrome/browser/chromeos/login/signin/oauth2_login_manager.h
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
index 4197cc86db90e00bf8d80157c67fbfaea0405ca9..fe2056f62185e0cbc0a2ed46a0b98d8456ef01dd 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
@@ -58,8 +58,8 @@ class OAuth2LoginManager : public KeyedService,
RESTORE_FROM_SAVED_OAUTH2_REFRESH_TOKEN,
// Restore session from OAuth2 refresh token passed via command line.
RESTORE_FROM_PASSED_OAUTH2_REFRESH_TOKEN,
- // Restore session from authentication code passed via command line.
- RESTORE_FROM_AUTH_CODE,
+ // Restore session from OAuth2 access token.
+ RESTORE_FROM_PASSED_OAUTH2_ACCESS_TOKEN,
};
class Observer {
@@ -87,19 +87,17 @@ class OAuth2LoginManager : public KeyedService,
// Restores and verifies OAuth tokens either following specified
// |restore_strategy|. For |restore_strategy| with values
// RESTORE_FROM_PASSED_OAUTH2_REFRESH_TOKEN or
- // RESTORE_FROM_AUTH_CODE, respectively
- // parameters |oauth2_refresh_token| or |auth_code| need to have non-empty
- // value.
- void RestoreSession(
- net::URLRequestContextGetter* auth_request_context,
- SessionRestoreStrategy restore_strategy,
- const std::string& oauth2_refresh_token,
- const std::string& auth_code);
+ // RESTORE_FROM_AUTH_CODE, respectively, parameters |oauth2_refresh_token| or
+ // |oauth2_access_token| need to have a non-empty value.
+ void RestoreSession(net::URLRequestContextGetter* auth_request_context,
+ SessionRestoreStrategy restore_strategy,
+ const std::string& oauth2_refresh_token,
+ const std::string& oauth2_access_token);
// Continues session restore after transient network errors.
void ContinueSessionRestore();
- // Start resporting session from saved OAuth2 refresh token.
+ // Start restoring session from saved OAuth2 refresh token.
void RestoreSessionFromSavedTokens();
// Stops all background authentication requests.
@@ -180,6 +178,9 @@ class OAuth2LoginManager : public KeyedService,
// Retrieves the primary account for |user_profile_|.
const std::string& GetPrimaryAccountId();
+ // Get External Token Handle.
+ void GetTokenHandle();
+
// Records |refresh_token_| to token service. The associated account id is
// assumed to be the primary account id of the user profile. If the primary
// account id is not present, GetAccountInfoOfRefreshToken will be called to
@@ -248,9 +249,6 @@ class OAuth2LoginManager : public KeyedService,
// OAuthLogin scoped access token.
std::string oauthlogin_access_token_;
- // Authorization code for fetching OAuth2 tokens.
- std::string auth_code_;
-
// Session restore start time.
base::Time session_restore_start_;

Powered by Google App Engine
This is Rietveld 408576698