| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/about_flags.h" | 7 #include "chrome/browser/about_flags.h" |
| 8 #include "chrome/browser/autofill/autofill_manager.h" | 8 #include "chrome/browser/autofill/autofill_manager.h" |
| 9 #include "chrome/browser/background/background_contents_service.h" | 9 #include "chrome/browser/background/background_contents_service.h" |
| 10 #include "chrome/browser/background/background_mode_manager.h" | 10 #include "chrome/browser/background/background_mode_manager.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 12 #include "chrome/browser/bookmarks/bookmark_utils.h" | 12 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 13 #include "chrome/browser/browser_shutdown.h" | 13 #include "chrome/browser/browser_shutdown.h" |
| 14 #include "chrome/browser/content_settings/host_content_settings_map.h" | 14 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 16 #include "chrome/browser/debugger/devtools_window.h" | 16 #include "chrome/browser/debugger/devtools_window.h" |
| 17 #include "chrome/browser/download/download_prefs.h" | 17 #include "chrome/browser/download/download_prefs.h" |
| 18 #include "chrome/browser/extensions/apps_promo.h" | 18 #include "chrome/browser/extensions/apps_promo.h" |
| 19 #include "chrome/browser/extensions/extension_prefs.h" | 19 #include "chrome/browser/extensions/extension_prefs.h" |
| 20 #include "chrome/browser/extensions/extension_web_ui.h" | 20 #include "chrome/browser/extensions/extension_web_ui.h" |
| 21 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 21 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 22 #include "chrome/browser/geolocation/geolocation_prefs.h" | 22 #include "chrome/browser/geolocation/geolocation_prefs.h" |
| 23 #include "chrome/browser/google/google_url_tracker.h" | 23 #include "chrome/browser/google/google_url_tracker.h" |
| 24 #include "chrome/browser/instant/instant_controller.h" | 24 #include "chrome/browser/instant/instant_controller.h" |
| 25 #include "chrome/browser/intranet_redirect_detector.h" | 25 #include "chrome/browser/intranet_redirect_detector.h" |
| 26 #include "chrome/browser/metrics/metrics_log.h" | 26 #include "chrome/browser/metrics/metrics_log.h" |
| 27 #include "chrome/browser/metrics/metrics_service.h" | 27 #include "chrome/browser/metrics/metrics_service.h" |
| 28 #include "chrome/browser/net/http_server_properties_manager.h" |
| 28 #include "chrome/browser/net/net_pref_observer.h" | 29 #include "chrome/browser/net/net_pref_observer.h" |
| 29 #include "chrome/browser/net/predictor.h" | 30 #include "chrome/browser/net/predictor.h" |
| 30 #include "chrome/browser/net/pref_proxy_config_service.h" | 31 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 31 #include "chrome/browser/net/ssl_config_service_manager.h" | 32 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 32 #include "chrome/browser/notifications/desktop_notification_service.h" | 33 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 33 #include "chrome/browser/notifications/notification_ui_manager.h" | 34 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 34 #include "chrome/browser/page_info_model.h" | 35 #include "chrome/browser/page_info_model.h" |
| 35 #include "chrome/browser/password_manager/password_manager.h" | 36 #include "chrome/browser/password_manager/password_manager.h" |
| 36 #include "chrome/browser/plugin_prefs.h" | 37 #include "chrome/browser/plugin_prefs.h" |
| 37 #include "chrome/browser/policy/cloud_policy_subsystem.h" | 38 #include "chrome/browser/policy/cloud_policy_subsystem.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 InstantController::RegisterUserPrefs(user_prefs); | 180 InstantController::RegisterUserPrefs(user_prefs); |
| 180 NetPrefObserver::RegisterPrefs(user_prefs); | 181 NetPrefObserver::RegisterPrefs(user_prefs); |
| 181 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); | 182 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); |
| 182 FirewallTraversalObserver::RegisterUserPrefs(user_prefs); | 183 FirewallTraversalObserver::RegisterUserPrefs(user_prefs); |
| 183 #if defined(OS_MACOSX) | 184 #if defined(OS_MACOSX) |
| 184 PresentationModePrefs::RegisterUserPrefs(user_prefs); | 185 PresentationModePrefs::RegisterUserPrefs(user_prefs); |
| 185 #endif | 186 #endif |
| 186 #if defined(ENABLE_CONFIGURATION_POLICY) | 187 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 187 policy::URLBlacklistManager::RegisterPrefs(user_prefs); | 188 policy::URLBlacklistManager::RegisterPrefs(user_prefs); |
| 188 #endif | 189 #endif |
| 190 chrome_browser_net::HttpServerPropertiesManager::RegisterPrefs(user_prefs); |
| 189 } | 191 } |
| 190 | 192 |
| 191 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 193 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
| 192 // Copy pref values which have been migrated to user_prefs from local_state, | 194 // Copy pref values which have been migrated to user_prefs from local_state, |
| 193 // or remove them from local_state outright, if copying is not required. | 195 // or remove them from local_state outright, if copying is not required. |
| 194 int current_version = | 196 int current_version = |
| 195 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 197 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
| 196 | 198 |
| 197 if ((current_version & WINDOWS_PREFS) == 0) { | 199 if ((current_version & WINDOWS_PREFS) == 0) { |
| 198 // Migrate the devtools split location preference. | 200 // Migrate the devtools split location preference. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 212 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 214 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
| 213 } | 215 } |
| 214 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 216 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
| 215 | 217 |
| 216 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 218 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 217 current_version | WINDOWS_PREFS); | 219 current_version | WINDOWS_PREFS); |
| 218 } | 220 } |
| 219 } | 221 } |
| 220 | 222 |
| 221 } // namespace browser | 223 } // namespace browser |
| OLD | NEW |