| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/prefs/browser_prefs.h" | 5 #include "chrome/browser/prefs/browser_prefs.h" |
| 6 | 6 |
| 7 #include "apps/prefs.h" | 7 #include "apps/prefs.h" |
| 8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/about_flags.h" | 10 #include "chrome/browser/about_flags.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/browser/profiles/profile_impl.h" | 55 #include "chrome/browser/profiles/profile_impl.h" |
| 56 #include "chrome/browser/profiles/profile_info_cache.h" | 56 #include "chrome/browser/profiles/profile_info_cache.h" |
| 57 #include "chrome/browser/profiles/profile_manager.h" | 57 #include "chrome/browser/profiles/profile_manager.h" |
| 58 #include "chrome/browser/renderer_host/web_cache_manager.h" | 58 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 59 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 59 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 60 #include "chrome/browser/signin/signin_manager_factory.h" | 60 #include "chrome/browser/signin/signin_manager_factory.h" |
| 61 #include "chrome/browser/sync/sync_prefs.h" | 61 #include "chrome/browser/sync/sync_prefs.h" |
| 62 #include "chrome/browser/task_manager/task_manager.h" | 62 #include "chrome/browser/task_manager/task_manager.h" |
| 63 #include "chrome/browser/translate/translate_prefs.h" | 63 #include "chrome/browser/translate/translate_prefs.h" |
| 64 #include "chrome/browser/ui/alternate_error_tab_observer.h" | 64 #include "chrome/browser/ui/alternate_error_tab_observer.h" |
| 65 #include "chrome/browser/ui/app_list/app_list_util.h" | 65 #include "chrome/browser/ui/app_list/app_list_service.h" |
| 66 #include "chrome/browser/ui/browser_instant_controller.h" | 66 #include "chrome/browser/ui/browser_instant_controller.h" |
| 67 #include "chrome/browser/ui/browser_ui_prefs.h" | 67 #include "chrome/browser/ui/browser_ui_prefs.h" |
| 68 #include "chrome/browser/ui/network_profile_bubble.h" | 68 #include "chrome/browser/ui/network_profile_bubble.h" |
| 69 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 69 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
| 70 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" | 70 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" |
| 71 #include "chrome/browser/ui/startup/autolaunch_prompt.h" | 71 #include "chrome/browser/ui/startup/autolaunch_prompt.h" |
| 72 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" | 72 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" |
| 73 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" | 73 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
| 74 #include "chrome/browser/ui/webui/flags_ui.h" | 74 #include "chrome/browser/ui/webui/flags_ui.h" |
| 75 #include "chrome/browser/ui/webui/instant_ui.h" | 75 #include "chrome/browser/ui/webui/instant_ui.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 // TODO(joi): Do the work needed to remove the PrefService parameter, | 154 // TODO(joi): Do the work needed to remove the PrefService parameter, |
| 155 // i.e. to do all registration up front before a PrefService is even | 155 // i.e. to do all registration up front before a PrefService is even |
| 156 // created. | 156 // created. |
| 157 void RegisterLocalState(PrefService* local_state, | 157 void RegisterLocalState(PrefService* local_state, |
| 158 PrefRegistrySimple* registry) { | 158 PrefRegistrySimple* registry) { |
| 159 // Prefs in Local State. | 159 // Prefs in Local State. |
| 160 registry->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); | 160 registry->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); |
| 161 | 161 |
| 162 // Please keep this list alphabetized. | 162 // Please keep this list alphabetized. |
| 163 AppListService::RegisterPrefs(registry); |
| 163 apps::RegisterPrefs(registry); | 164 apps::RegisterPrefs(registry); |
| 164 browser_shutdown::RegisterPrefs(registry); | 165 browser_shutdown::RegisterPrefs(registry); |
| 165 BrowserProcessImpl::RegisterPrefs(registry); | 166 BrowserProcessImpl::RegisterPrefs(registry); |
| 166 chrome::RegisterScreenshotPrefs(registry); | 167 chrome::RegisterScreenshotPrefs(registry); |
| 167 ExternalProtocolHandler::RegisterPrefs(registry); | 168 ExternalProtocolHandler::RegisterPrefs(registry); |
| 168 FlagsUI::RegisterPrefs(registry); | 169 FlagsUI::RegisterPrefs(registry); |
| 169 geolocation::RegisterPrefs(registry); | 170 geolocation::RegisterPrefs(registry); |
| 170 IntranetRedirectDetector::RegisterPrefs(registry); | 171 IntranetRedirectDetector::RegisterPrefs(registry); |
| 171 KeywordEditorController::RegisterPrefs(registry); | 172 KeywordEditorController::RegisterPrefs(registry); |
| 172 MetricsLog::RegisterPrefs(registry); | 173 MetricsLog::RegisterPrefs(registry); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 chromeos::UserManager::RegisterPrefs(registry); | 227 chromeos::UserManager::RegisterPrefs(registry); |
| 227 chromeos::WallpaperManager::RegisterPrefs(registry); | 228 chromeos::WallpaperManager::RegisterPrefs(registry); |
| 228 chromeos::WizardController::RegisterPrefs(registry); | 229 chromeos::WizardController::RegisterPrefs(registry); |
| 229 policy::AutoEnrollmentClient::RegisterPrefs(registry); | 230 policy::AutoEnrollmentClient::RegisterPrefs(registry); |
| 230 policy::DeviceStatusCollector::RegisterPrefs(registry); | 231 policy::DeviceStatusCollector::RegisterPrefs(registry); |
| 231 #endif | 232 #endif |
| 232 | 233 |
| 233 #if defined(OS_MACOSX) | 234 #if defined(OS_MACOSX) |
| 234 confirm_quit::RegisterLocalState(registry); | 235 confirm_quit::RegisterLocalState(registry); |
| 235 #endif | 236 #endif |
| 236 | |
| 237 #if defined(ENABLE_SETTINGS_APP) | |
| 238 chrome::RegisterAppListPrefs(registry); | |
| 239 #endif | |
| 240 } | 237 } |
| 241 | 238 |
| 242 void RegisterUserPrefs(PrefService* user_prefs, | 239 void RegisterUserPrefs(PrefService* user_prefs, |
| 243 PrefRegistrySyncable* registry) { | 240 PrefRegistrySyncable* registry) { |
| 244 // TODO(joi): Get rid of the need for the PrefService parameter, and | 241 // TODO(joi): Get rid of the need for the PrefService parameter, and |
| 245 // do registration prior to PrefService creation. | 242 // do registration prior to PrefService creation. |
| 246 | 243 |
| 247 // User prefs. Please keep this list alphabetized. | 244 // User prefs. Please keep this list alphabetized. |
| 248 AlternateErrorPageTabObserver::RegisterUserPrefs(registry); | 245 AlternateErrorPageTabObserver::RegisterUserPrefs(registry); |
| 249 AutofillManager::RegisterUserPrefs(registry); | 246 AutofillManager::RegisterUserPrefs(registry); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 } | 409 } |
| 413 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 410 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
| 414 | 411 |
| 415 current_version |= GOOGLE_URL_TRACKER_PREFS; | 412 current_version |= GOOGLE_URL_TRACKER_PREFS; |
| 416 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 413 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 417 current_version); | 414 current_version); |
| 418 } | 415 } |
| 419 } | 416 } |
| 420 | 417 |
| 421 } // namespace chrome | 418 } // namespace chrome |
| OLD | NEW |