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

Side by Side Diff: chrome/browser/signin/signin_manager_factory.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) 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 "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return static_cast<SigninManager*>( 48 return static_cast<SigninManager*>(
49 GetInstance()->GetServiceForProfile(profile, false)); 49 GetInstance()->GetServiceForProfile(profile, false));
50 } 50 }
51 #endif 51 #endif
52 52
53 // static 53 // static
54 SigninManagerFactory* SigninManagerFactory::GetInstance() { 54 SigninManagerFactory* SigninManagerFactory::GetInstance() {
55 return Singleton<SigninManagerFactory>::get(); 55 return Singleton<SigninManagerFactory>::get();
56 } 56 }
57 57
58 void SigninManagerFactory::RegisterUserPrefs(PrefRegistrySyncable* registry) { 58 void SigninManagerFactory::RegisterUserPrefs(
59 registry->RegisterStringPref(prefs::kGoogleServicesLastUsername, 59 user_prefs::PrefRegistrySyncable* registry) {
60 std::string(), 60 registry->RegisterStringPref(
61 PrefRegistrySyncable::UNSYNCABLE_PREF); 61 prefs::kGoogleServicesLastUsername,
62 registry->RegisterStringPref(prefs::kGoogleServicesUsername, 62 std::string(),
63 std::string(), 63 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
64 PrefRegistrySyncable::UNSYNCABLE_PREF); 64 registry->RegisterStringPref(
65 registry->RegisterBooleanPref(prefs::kAutologinEnabled, true, 65 prefs::kGoogleServicesUsername,
66 PrefRegistrySyncable::UNSYNCABLE_PREF); 66 std::string(),
67 registry->RegisterBooleanPref(prefs::kReverseAutologinEnabled, true, 67 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
68 PrefRegistrySyncable::UNSYNCABLE_PREF); 68 registry->RegisterBooleanPref(
69 prefs::kAutologinEnabled,
70 true,
71 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
72 registry->RegisterBooleanPref(
73 prefs::kReverseAutologinEnabled,
74 true,
75 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
69 registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList, 76 registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList,
70 new ListValue, 77 new ListValue,
71 PrefRegistrySyncable::UNSYNCABLE_PREF); 78 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
72 } 79 }
73 80
74 // static 81 // static
75 void SigninManagerFactory::RegisterPrefs(PrefRegistrySimple* registry) { 82 void SigninManagerFactory::RegisterPrefs(PrefRegistrySimple* registry) {
76 registry->RegisterStringPref(prefs::kGoogleServicesUsernamePattern, 83 registry->RegisterStringPref(prefs::kGoogleServicesUsernamePattern,
77 std::string()); 84 std::string());
78 } 85 }
79 86
80 ProfileKeyedService* SigninManagerFactory::BuildServiceInstanceFor( 87 ProfileKeyedService* SigninManagerFactory::BuildServiceInstanceFor(
81 content::BrowserContext* profile) const { 88 content::BrowserContext* profile) const {
82 SigninManagerBase* service = NULL; 89 SigninManagerBase* service = NULL;
83 #if defined(OS_CHROMEOS) 90 #if defined(OS_CHROMEOS)
84 service = new SigninManagerBase(); 91 service = new SigninManagerBase();
85 #else 92 #else
86 service = new SigninManager(); 93 service = new SigninManager();
87 #endif 94 #endif
88 service->Initialize(static_cast<Profile*>(profile)); 95 service->Initialize(static_cast<Profile*>(profile));
89 return service; 96 return service;
90 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.h ('k') | chrome/browser/speech/chrome_speech_recognition_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698