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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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/about_signin_internals_factory.h" 5 #include "chrome/browser/signin/about_signin_internals_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/signin/about_signin_internals.h" 8 #include "chrome/browser/signin/about_signin_internals.h"
9 #include "chrome/browser/signin/signin_internals_util.h" 9 #include "chrome/browser/signin/signin_internals_util.h"
10 #include "chrome/browser/signin/token_service_factory.h" 10 #include "chrome/browser/signin/token_service_factory.h"
(...skipping 19 matching lines...) Expand all
30 Profile* profile) { 30 Profile* profile) {
31 return static_cast<AboutSigninInternals*>( 31 return static_cast<AboutSigninInternals*>(
32 GetInstance()->GetServiceForBrowserContext(profile, true)); 32 GetInstance()->GetServiceForBrowserContext(profile, true));
33 } 33 }
34 34
35 // static 35 // static
36 AboutSigninInternalsFactory* AboutSigninInternalsFactory::GetInstance() { 36 AboutSigninInternalsFactory* AboutSigninInternalsFactory::GetInstance() {
37 return Singleton<AboutSigninInternalsFactory>::get(); 37 return Singleton<AboutSigninInternalsFactory>::get();
38 } 38 }
39 39
40 void AboutSigninInternalsFactory::RegisterUserPrefs( 40 void AboutSigninInternalsFactory::RegisterProfilePrefs(
41 user_prefs::PrefRegistrySyncable* user_prefs) { 41 user_prefs::PrefRegistrySyncable* user_prefs) {
42 // SigninManager information for about:signin-internals. 42 // SigninManager information for about:signin-internals.
43 for (int i = UNTIMED_FIELDS_BEGIN; i < UNTIMED_FIELDS_END; ++i) { 43 for (int i = UNTIMED_FIELDS_BEGIN; i < UNTIMED_FIELDS_END; ++i) {
44 const std::string pref_path = SigninStatusFieldToString( 44 const std::string pref_path = SigninStatusFieldToString(
45 static_cast<UntimedSigninStatusField>(i)); 45 static_cast<UntimedSigninStatusField>(i));
46 user_prefs->RegisterStringPref( 46 user_prefs->RegisterStringPref(
47 pref_path.c_str(), 47 pref_path.c_str(),
48 std::string(), 48 std::string(),
49 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 49 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
50 } 50 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 } 89 }
90 90
91 BrowserContextKeyedService* 91 BrowserContextKeyedService*
92 AboutSigninInternalsFactory::BuildServiceInstanceFor( 92 AboutSigninInternalsFactory::BuildServiceInstanceFor(
93 content::BrowserContext* profile) const { 93 content::BrowserContext* profile) const {
94 AboutSigninInternals* service = new AboutSigninInternals(); 94 AboutSigninInternals* service = new AboutSigninInternals();
95 service->Initialize(static_cast<Profile*>(profile)); 95 service->Initialize(static_cast<Profile*>(profile));
96 return service; 96 return service;
97 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/about_signin_internals_factory.h ('k') | chrome/browser/signin/signin_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698