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

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: OAuth2TokenInitializer for non-SAML only 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 15b3473361a3f51046a84e3a6385d63516abc479..a197d8c5ad634da7baff190f5991dabd2a1c54b5 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
@@ -58,8 +58,6 @@ 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,
};
class Observer {
@@ -84,24 +82,20 @@ class OAuth2LoginManager : public KeyedService,
void AddObserver(OAuth2LoginManager::Observer* observer);
void RemoveObserver(OAuth2LoginManager::Observer* observer);
- // 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.
- // For |restore_strategy| with values RESTORE_FROM_COOKIE_JAR or
- // RESTORE_FROM_AUTH_CODE |auth_request_context| must be initialized.
- void RestoreSession(
- net::URLRequestContextGetter* auth_request_context,
- SessionRestoreStrategy restore_strategy,
- const std::string& oauth2_refresh_token,
- const std::string& auth_code);
+ // Restores and verifies OAuth tokens following specified |restore_strategy|.
+ // For |restore_strategy| RESTORE_FROM_PASSED_OAUTH2_REFRESH_TOKEN, parameter
+ // |oauth2_refresh_token| needs to have a non-empty value.
+ // For |restore_strategy| RESTORE_FROM_COOKIE_JAR |auth_request_context| must
+ // be initialized.
+ 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.
@@ -152,7 +146,7 @@ class OAuth2LoginManager : public KeyedService,
// gaia::GaiaOAuthClient::Delegate overrides.
void OnRefreshTokenResponse(const std::string& access_token,
- int expires_in_seconds) override;
+ int expires_in_seconds) override;
void OnGetUserInfoResponse(
scoped_ptr<base::DictionaryValue> user_info) override;
void OnOAuthError() override;
@@ -250,9 +244,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