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

Side by Side Diff: chrome/browser/chromeos/login/oauth2_login_manager.cc

Issue 14622003: components: Move PrefRegistrySyncable into user_prefs namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/string_util.h" 10 #include "base/string_util.h"
(...skipping 21 matching lines...) Expand all
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(PrefRegistrySyncable* registry) { 42 void OAuth2LoginManager::RegisterUserPrefs(
43 registry->RegisterStringPref(kOAuth1Token, 43 user_prefs::PrefRegistrySyncable* registry) {
44 "", 44 registry->RegisterStringPref(
45 PrefRegistrySyncable::UNSYNCABLE_PREF); 45 kOAuth1Token, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
46 registry->RegisterStringPref(kOAuth1Secret, 46 registry->RegisterStringPref(
47 "", 47 kOAuth1Secret, "", user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
48 PrefRegistrySyncable::UNSYNCABLE_PREF);
49 } 48 }
50 49
51 void OAuth2LoginManager::RestoreSession( 50 void OAuth2LoginManager::RestoreSession(
52 Profile* user_profile, 51 Profile* user_profile,
53 net::URLRequestContextGetter* auth_request_context, 52 net::URLRequestContextGetter* auth_request_context,
54 SessionRestoreStrategy restore_strategy, 53 SessionRestoreStrategy restore_strategy,
55 const std::string& oauth2_refresh_token, 54 const std::string& oauth2_refresh_token,
56 const std::string& auth_code) { 55 const std::string& auth_code) {
57 // TODO(nkostylev): OAuth2LoginManager should support multi-profiles or 56 // TODO(nkostylev): OAuth2LoginManager should support multi-profiles or
58 // should be refactored as ProfileKeyedService. For now we unsubscribe from 57 // should be refactored as ProfileKeyedService. For now we unsubscribe from
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 270 }
272 271
273 void OAuth2LoginManager::StartTokenService( 272 void OAuth2LoginManager::StartTokenService(
274 const GaiaAuthConsumer::ClientLoginResult& gaia_credentials) { 273 const GaiaAuthConsumer::ClientLoginResult& gaia_credentials) {
275 TokenService* token_service = SetupTokenService(); 274 TokenService* token_service = SetupTokenService();
276 token_service->UpdateCredentials(gaia_credentials); 275 token_service->UpdateCredentials(gaia_credentials);
277 CompleteAuthentication(); 276 CompleteAuthentication();
278 } 277 }
279 278
280 } // namespace chromeos 279 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/oauth2_login_manager.h ('k') | chrome/browser/chromeos/preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698