| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" | 5 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace chromeos { | 32 namespace chromeos { |
| 33 | 33 |
| 34 OAuth2LoginManager::OAuth2LoginManager(OAuthLoginManager::Delegate* delegate) | 34 OAuth2LoginManager::OAuth2LoginManager(OAuthLoginManager::Delegate* delegate) |
| 35 : OAuthLoginManager(delegate), | 35 : OAuthLoginManager(delegate), |
| 36 loading_reported_(false) { | 36 loading_reported_(false) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 OAuth2LoginManager::~OAuth2LoginManager() { | 39 OAuth2LoginManager::~OAuth2LoginManager() { |
| 40 } | 40 } |
| 41 | 41 |
| 42 void OAuth2LoginManager::RegisterUserPrefs( | 42 void OAuth2LoginManager::RegisterProfilePrefs( |
| 43 user_prefs::PrefRegistrySyncable* registry) { | 43 user_prefs::PrefRegistrySyncable* registry) { |
| 44 registry->RegisterStringPref( | 44 registry->RegisterStringPref( |
| 45 kOAuth1Token, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 45 kOAuth1Token, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 46 registry->RegisterStringPref( | 46 registry->RegisterStringPref( |
| 47 kOAuth1Secret, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 47 kOAuth1Secret, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void OAuth2LoginManager::RestoreSession( | 50 void OAuth2LoginManager::RestoreSession( |
| 51 Profile* user_profile, | 51 Profile* user_profile, |
| 52 net::URLRequestContextGetter* auth_request_context, | 52 net::URLRequestContextGetter* auth_request_context, |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 270 } |
| 271 | 271 |
| 272 void OAuth2LoginManager::StartTokenService( | 272 void OAuth2LoginManager::StartTokenService( |
| 273 const GaiaAuthConsumer::ClientLoginResult& gaia_credentials) { | 273 const GaiaAuthConsumer::ClientLoginResult& gaia_credentials) { |
| 274 TokenService* token_service = SetupTokenService(); | 274 TokenService* token_service = SetupTokenService(); |
| 275 token_service->UpdateCredentials(gaia_credentials); | 275 token_service->UpdateCredentials(gaia_credentials); |
| 276 CompleteAuthentication(); | 276 CompleteAuthentication(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace chromeos | 279 } // namespace chromeos |
| OLD | NEW |