| 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 "base/prefs/pref_registry_simple.h" | 7 #include "base/prefs/pref_registry_simple.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/first_run/first_run.h" | 9 #include "chrome/browser/first_run/first_run.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "components/user_prefs/pref_registry_syncable.h" | 12 #include "components/user_prefs/pref_registry_syncable.h" |
| 13 | 13 |
| 14 namespace chrome { | 14 namespace chrome { |
| 15 | 15 |
| 16 void RegisterBrowserPrefs(PrefRegistrySimple* registry) { | 16 void RegisterBrowserPrefs(PrefRegistrySimple* registry) { |
| 17 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); | 17 registry->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); |
| 18 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true); | 18 registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true); |
| 19 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption, | 19 registry->RegisterIntegerPref(prefs::kShowFirstRunBubbleOption, |
| 20 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); | 20 first_run::FIRST_RUN_BUBBLE_DONT_SHOW); |
| 21 } | 21 } |
| 22 | 22 |
| 23 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { | 23 void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 24 registry->RegisterBooleanPref( | 24 registry->RegisterBooleanPref( |
| 25 prefs::kHomePageChanged, | |
| 26 false, | |
| 27 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 28 registry->RegisterBooleanPref( | |
| 29 prefs::kHomePageIsNewTabPage, | 25 prefs::kHomePageIsNewTabPage, |
| 30 true, | 26 true, |
| 31 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 27 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 32 registry->RegisterBooleanPref( | 28 registry->RegisterBooleanPref( |
| 33 prefs::kShowHomeButton, | 29 prefs::kShowHomeButton, |
| 34 false, | 30 false, |
| 35 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 31 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 36 #if defined(OS_MACOSX) | 32 #if defined(OS_MACOSX) |
| 37 // This really belongs in platform code, but there's no good place to | 33 // This really belongs in platform code, but there's no good place to |
| 38 // initialize it between the time when the AppController is created | 34 // initialize it between the time when the AppController is created |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( | 208 scoped_refptr<user_prefs::PrefRegistrySyncable> registry( |
| 213 static_cast<user_prefs::PrefRegistrySyncable*>( | 209 static_cast<user_prefs::PrefRegistrySyncable*>( |
| 214 prefs->DeprecatedGetPrefRegistry())); | 210 prefs->DeprecatedGetPrefRegistry())); |
| 215 registry->RegisterDictionaryPref( | 211 registry->RegisterDictionaryPref( |
| 216 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 212 window_pref.c_str(), user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 217 } | 213 } |
| 218 } | 214 } |
| 219 | 215 |
| 220 | 216 |
| 221 } // namespace chrome | 217 } // namespace chrome |
| OLD | NEW |