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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 8509037: Revert 109826 - Re-authenticate oauth tokens after crash and restart Sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « chrome/browser/chromeos/login/login_utils.h ('k') | chrome/browser/chromeos/login/mock_authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
===================================================================
--- chrome/browser/chromeos/login/login_utils.cc (revision 109836)
+++ chrome/browser/chromeos/login/login_utils.cc (working copy)
@@ -438,8 +438,6 @@
virtual scoped_refptr<Authenticator> CreateAuthenticator(
LoginStatusConsumer* consumer) OVERRIDE;
virtual void PrewarmAuthentication() OVERRIDE;
- virtual void RestoreAuthenticationSession(const std::string& user_name,
- Profile* profile) OVERRIDE;
virtual void FetchCookies(
Profile* profile,
const GaiaAuthConsumer::ClientLoginResult& credentials) OVERRIDE;
@@ -481,9 +479,6 @@
CommandLine *command_line);
private:
- // Restarts OAuth session authentication check.
- void KickStartAuthentication(Profile* profile);
-
// Reads OAuth1 token from user profile's prefs.
bool ReadOAuth1AccessToken(Profile* user_profile,
std::string* token,
@@ -1024,23 +1019,6 @@
}
}
-void LoginUtilsImpl::RestoreAuthenticationSession(const std::string& username,
- Profile* user_profile) {
- username_ = username;
- KickStartAuthentication(user_profile);
-}
-
-void LoginUtilsImpl::KickStartAuthentication(Profile* user_profile) {
- if (!authenticator_.get())
- CreateAuthenticator(NULL);
- std::string oauth1_token;
- std::string oauth1_secret;
- if (ReadOAuth1AccessToken(user_profile, &oauth1_token, &oauth1_secret))
- VerifyOAuth1AccessToken(user_profile, oauth1_token, oauth1_secret);
-
- authenticator_ = NULL;
-}
-
void LoginUtilsImpl::SetBackgroundView(BackgroundView* background_view) {
background_view_ = background_view;
}
@@ -1187,7 +1165,14 @@
// we need to kick of OAuth token verification process again.
if (UserManager::Get()->user_is_logged_in() &&
UserManager::Get()->offline_login() && online) {
- KickStartAuthentication(ProfileManager::GetDefaultProfile());
+ if (!authenticator_.get())
+ CreateAuthenticator(NULL);
+ std::string oauth1_token;
+ std::string oauth1_secret;
+ Profile* user_profile = ProfileManager::GetDefaultProfile();
+ if (ReadOAuth1AccessToken(user_profile, &oauth1_token, &oauth1_secret))
+ VerifyOAuth1AccessToken(user_profile, oauth1_token, oauth1_secret);
+ authenticator_ = NULL;
}
}
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.h ('k') | chrome/browser/chromeos/login/mock_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698