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

Side by Side Diff: chrome/browser/themes/theme_service_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/themes/theme_service_factory.h" 5 #include "chrome/browser/themes/theme_service_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #if defined(TOOLKIT_GTK) 51 #if defined(TOOLKIT_GTK)
52 provider = new GtkThemeService; 52 provider = new GtkThemeService;
53 #else 53 #else
54 provider = new ThemeService; 54 provider = new ThemeService;
55 #endif 55 #endif
56 provider->Init(static_cast<Profile*>(profile)); 56 provider->Init(static_cast<Profile*>(profile));
57 57
58 return provider; 58 return provider;
59 } 59 }
60 60
61 void ThemeServiceFactory::RegisterUserPrefs(PrefRegistrySyncable* registry) { 61 void ThemeServiceFactory::RegisterUserPrefs(
62 user_prefs::PrefRegistrySyncable* registry) {
62 #if defined(TOOLKIT_GTK) 63 #if defined(TOOLKIT_GTK)
63 registry->RegisterBooleanPref(prefs::kUsesSystemTheme, 64 registry->RegisterBooleanPref(
64 GtkThemeService::DefaultUsesSystemTheme(), 65 prefs::kUsesSystemTheme,
65 PrefRegistrySyncable::UNSYNCABLE_PREF); 66 GtkThemeService::DefaultUsesSystemTheme(),
67 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
66 #endif 68 #endif
67 registry->RegisterFilePathPref(prefs::kCurrentThemePackFilename, 69 registry->RegisterFilePathPref(
68 base::FilePath(), 70 prefs::kCurrentThemePackFilename,
69 PrefRegistrySyncable::UNSYNCABLE_PREF); 71 base::FilePath(),
70 registry->RegisterStringPref(prefs::kCurrentThemeID, 72 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
71 ThemeService::kDefaultThemeID, 73 registry->RegisterStringPref(
72 PrefRegistrySyncable::UNSYNCABLE_PREF); 74 prefs::kCurrentThemeID,
73 registry->RegisterDictionaryPref(prefs::kCurrentThemeImages, 75 ThemeService::kDefaultThemeID,
74 PrefRegistrySyncable::UNSYNCABLE_PREF); 76 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
75 registry->RegisterDictionaryPref(prefs::kCurrentThemeColors, 77 registry->RegisterDictionaryPref(
76 PrefRegistrySyncable::UNSYNCABLE_PREF); 78 prefs::kCurrentThemeImages,
77 registry->RegisterDictionaryPref(prefs::kCurrentThemeTints, 79 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
78 PrefRegistrySyncable::UNSYNCABLE_PREF); 80 registry->RegisterDictionaryPref(
79 registry->RegisterDictionaryPref(prefs::kCurrentThemeDisplayProperties, 81 prefs::kCurrentThemeColors,
80 PrefRegistrySyncable::UNSYNCABLE_PREF); 82 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
83 registry->RegisterDictionaryPref(
84 prefs::kCurrentThemeTints,
85 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
86 registry->RegisterDictionaryPref(
87 prefs::kCurrentThemeDisplayProperties,
88 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
81 } 89 }
82 90
83 content::BrowserContext* ThemeServiceFactory::GetBrowserContextToUse( 91 content::BrowserContext* ThemeServiceFactory::GetBrowserContextToUse(
84 content::BrowserContext* context) const { 92 content::BrowserContext* context) const {
85 return chrome::GetBrowserContextRedirectedInIncognito(context); 93 return chrome::GetBrowserContextRedirectedInIncognito(context);
86 } 94 }
87 95
88 bool ThemeServiceFactory::ServiceIsCreatedWithProfile() const { 96 bool ThemeServiceFactory::ServiceIsCreatedWithProfile() const {
89 return true; 97 return true;
90 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_factory.h ('k') | chrome/browser/translate/translate_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698