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

Side by Side Diff: chrome/browser/signin/signin_manager_factory.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/signin/signin_manager_factory.h" 5 #include "chrome/browser/signin/signin_manager_factory.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/signin/signin_manager.h" 9 #include "chrome/browser/signin/signin_manager.h"
10 #include "chrome/browser/signin/token_service_factory.h" 10 #include "chrome/browser/signin/token_service_factory.h"
(...skipping 17 matching lines...) Expand all
28 SigninManager* SigninManagerFactory::GetForProfileIfExists(Profile* profile) { 28 SigninManager* SigninManagerFactory::GetForProfileIfExists(Profile* profile) {
29 return static_cast<SigninManager*>( 29 return static_cast<SigninManager*>(
30 GetInstance()->GetServiceForProfile(profile, false)); 30 GetInstance()->GetServiceForProfile(profile, false));
31 } 31 }
32 32
33 // static 33 // static
34 SigninManagerFactory* SigninManagerFactory::GetInstance() { 34 SigninManagerFactory* SigninManagerFactory::GetInstance() {
35 return Singleton<SigninManagerFactory>::get(); 35 return Singleton<SigninManagerFactory>::get();
36 } 36 }
37 37
38 void SigninManagerFactory::RegisterUserPrefs(PrefService* user_prefs) { 38 void SigninManagerFactory::RegisterUserPrefs(PrefServiceSyncable* user_prefs) {
39 user_prefs->RegisterStringPref(prefs::kGoogleServicesLastUsername, "", 39 user_prefs->RegisterStringPref(prefs::kGoogleServicesLastUsername, "",
40 PrefService::UNSYNCABLE_PREF); 40 PrefServiceSyncable::UNSYNCABLE_PREF);
41 user_prefs->RegisterStringPref(prefs::kGoogleServicesUsername, "", 41 user_prefs->RegisterStringPref(prefs::kGoogleServicesUsername, "",
42 PrefService::UNSYNCABLE_PREF); 42 PrefServiceSyncable::UNSYNCABLE_PREF);
43 user_prefs->RegisterBooleanPref(prefs::kAutologinEnabled, true, 43 user_prefs->RegisterBooleanPref(prefs::kAutologinEnabled, true,
44 PrefService::UNSYNCABLE_PREF); 44 PrefServiceSyncable::UNSYNCABLE_PREF);
45 user_prefs->RegisterBooleanPref(prefs::kReverseAutologinEnabled, true, 45 user_prefs->RegisterBooleanPref(prefs::kReverseAutologinEnabled, true,
46 PrefService::UNSYNCABLE_PREF); 46 PrefServiceSyncable::UNSYNCABLE_PREF);
47 user_prefs->RegisterListPref(prefs::kReverseAutologinRejectedEmailList, 47 user_prefs->RegisterListPref(prefs::kReverseAutologinRejectedEmailList,
48 new ListValue, PrefService::UNSYNCABLE_PREF); 48 new ListValue,
49 PrefServiceSyncable::UNSYNCABLE_PREF);
49 user_prefs->RegisterBooleanPref(prefs::kIsGooglePlusUser, false, 50 user_prefs->RegisterBooleanPref(prefs::kIsGooglePlusUser, false,
50 PrefService::UNSYNCABLE_PREF); 51 PrefServiceSyncable::UNSYNCABLE_PREF);
51 } 52 }
52 53
53 // static 54 // static
54 void SigninManagerFactory::RegisterPrefs(PrefService* local_state) { 55 void SigninManagerFactory::RegisterPrefs(PrefServiceSimple* local_state) {
55 local_state->RegisterStringPref(prefs::kGoogleServicesUsernamePattern, "", 56 local_state->RegisterStringPref(prefs::kGoogleServicesUsernamePattern, "");
56 PrefService::UNSYNCABLE_PREF);
57 } 57 }
58 58
59 ProfileKeyedService* SigninManagerFactory::BuildServiceInstanceFor( 59 ProfileKeyedService* SigninManagerFactory::BuildServiceInstanceFor(
60 Profile* profile) const { 60 Profile* profile) const {
61 SigninManager* service = new SigninManager(); 61 SigninManager* service = new SigninManager();
62 service->Initialize(profile); 62 service->Initialize(profile);
63 return service; 63 return service;
64 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698