| 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;
|
| }
|
| }
|
|
|
|
|