OLD | NEW |
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 Loading... |
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 |
OLD | NEW |