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

Side by Side Diff: chrome/browser/ui/browser_ui_prefs.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.h ('k') | chrome/browser/ui/browser_view_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/browser_ui_prefs.h" 5 #include "chrome/browser/ui/browser_ui_prefs.h"
6 6
7 #include "chrome/browser/first_run/first_run.h" 7 #include "chrome/browser/first_run/first_run.h"
8 #include "chrome/browser/prefs/pref_registry_simple.h"
8 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
11 12
12 namespace chrome { 13 namespace chrome {
13 14
14 void RegisterBrowserPrefs(PrefServiceSimple* prefs) { 15 void RegisterBrowserPrefs(PrefRegistrySimple* registry) {
15 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 16 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
16 prefs->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true); 17 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
17 prefs->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption, 18 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption,
18 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); 19 first_run::FIRST_RUN_BUBBLE_DONT_SHOW);
19 } 20 }
20 21
21 void RegisterBrowserUserPrefs(PrefServiceSyncable* prefs) { 22 void RegisterBrowserUserPrefs(PrefServiceSyncable* prefs) {
22 prefs->RegisterBooleanPref(prefs::kHomePageChanged, 23 prefs->RegisterBooleanPref(prefs::kHomePageChanged,
23 false, 24 false,
24 PrefServiceSyncable::UNSYNCABLE_PREF); 25 PrefServiceSyncable::UNSYNCABLE_PREF);
25 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, 26 prefs->RegisterBooleanPref(prefs::kHomePageIsNewTabPage,
26 true, 27 true,
27 PrefServiceSyncable::SYNCABLE_PREF); 28 PrefServiceSyncable::SYNCABLE_PREF);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // TODO(joi): Switch to official way of registering local prefs 170 // TODO(joi): Switch to official way of registering local prefs
170 // for this class, i.e. in a function called from 171 // for this class, i.e. in a function called from
171 // browser_prefs::RegisterUserPrefs. 172 // browser_prefs::RegisterUserPrefs.
172 prefs->RegisterDictionaryPref(window_pref.c_str(), 173 prefs->RegisterDictionaryPref(window_pref.c_str(),
173 PrefServiceSyncable::UNSYNCABLE_PREF); 174 PrefServiceSyncable::UNSYNCABLE_PREF);
174 } 175 }
175 } 176 }
176 177
177 178
178 } // namespace chrome 179 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.h ('k') | chrome/browser/ui/browser_view_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698