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_contents_service.h" | 9 #include "chrome/browser/background_contents_service.h" |
10 #include "chrome/browser/background_mode_manager.h" | 10 #include "chrome/browser/background_mode_manager.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/intranet_redirect_detector.h" | 27 #include "chrome/browser/intranet_redirect_detector.h" |
28 #include "chrome/browser/metrics/metrics_log.h" | 28 #include "chrome/browser/metrics/metrics_log.h" |
29 #include "chrome/browser/metrics/metrics_service.h" | 29 #include "chrome/browser/metrics/metrics_service.h" |
30 #include "chrome/browser/net/net_pref_observer.h" | 30 #include "chrome/browser/net/net_pref_observer.h" |
31 #include "chrome/browser/net/predictor_api.h" | 31 #include "chrome/browser/net/predictor_api.h" |
32 #include "chrome/browser/net/pref_proxy_config_service.h" | 32 #include "chrome/browser/net/pref_proxy_config_service.h" |
33 #include "chrome/browser/notifications/desktop_notification_service.h" | 33 #include "chrome/browser/notifications/desktop_notification_service.h" |
34 #include "chrome/browser/notifications/notification_ui_manager.h" | 34 #include "chrome/browser/notifications/notification_ui_manager.h" |
35 #include "chrome/browser/page_info_model.h" | 35 #include "chrome/browser/page_info_model.h" |
36 #include "chrome/browser/password_manager/password_manager.h" | 36 #include "chrome/browser/password_manager/password_manager.h" |
37 #include "chrome/browser/policy/profile_policy_context.h" | 37 #include "chrome/browser/policy/browser_policy_connector.h" |
| 38 #include "chrome/browser/policy/profile_policy_connector.h" |
38 #include "chrome/browser/prefs/session_startup_pref.h" | 39 #include "chrome/browser/prefs/session_startup_pref.h" |
39 #include "chrome/browser/profiles/profile_impl.h" | 40 #include "chrome/browser/profiles/profile_impl.h" |
40 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 41 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
41 #include "chrome/browser/renderer_host/web_cache_manager.h" | 42 #include "chrome/browser/renderer_host/web_cache_manager.h" |
42 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 43 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
43 #include "chrome/browser/search_engines/keyword_editor_controller.h" | 44 #include "chrome/browser/search_engines/keyword_editor_controller.h" |
44 #include "chrome/browser/search_engines/template_url_model.h" | 45 #include "chrome/browser/search_engines/template_url_model.h" |
45 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 46 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
46 #include "chrome/browser/ssl/ssl_manager.h" | 47 #include "chrome/browser/ssl/ssl_manager.h" |
47 #include "chrome/browser/sync/signin_manager.h" | 48 #include "chrome/browser/sync/signin_manager.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 #if defined(TOOLKIT_VIEWS) | 94 #if defined(TOOLKIT_VIEWS) |
94 BrowserView::RegisterBrowserViewPrefs(local_state); | 95 BrowserView::RegisterBrowserViewPrefs(local_state); |
95 #endif | 96 #endif |
96 UpgradeDetector::RegisterPrefs(local_state); | 97 UpgradeDetector::RegisterPrefs(local_state); |
97 TaskManager::RegisterPrefs(local_state); | 98 TaskManager::RegisterPrefs(local_state); |
98 geolocation::RegisterPrefs(local_state); | 99 geolocation::RegisterPrefs(local_state); |
99 AutoFillManager::RegisterBrowserPrefs(local_state); | 100 AutoFillManager::RegisterBrowserPrefs(local_state); |
100 BackgroundPageTracker::RegisterPrefs(local_state); | 101 BackgroundPageTracker::RegisterPrefs(local_state); |
101 NotificationUIManager::RegisterPrefs(local_state); | 102 NotificationUIManager::RegisterPrefs(local_state); |
102 PrefProxyConfigService::RegisterPrefs(local_state); | 103 PrefProxyConfigService::RegisterPrefs(local_state); |
| 104 policy::BrowserPolicyConnector::RegisterPrefs(local_state); |
103 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
104 chromeos::AudioMixerAlsa::RegisterPrefs(local_state); | 106 chromeos::AudioMixerAlsa::RegisterPrefs(local_state); |
105 chromeos::UserManager::RegisterPrefs(local_state); | 107 chromeos::UserManager::RegisterPrefs(local_state); |
106 chromeos::UserCrosSettingsProvider::RegisterPrefs(local_state); | 108 chromeos::UserCrosSettingsProvider::RegisterPrefs(local_state); |
107 WizardController::RegisterPrefs(local_state); | 109 WizardController::RegisterPrefs(local_state); |
108 chromeos::InputMethodMenu::RegisterPrefs(local_state); | 110 chromeos::InputMethodMenu::RegisterPrefs(local_state); |
109 chromeos::ApplyServicesCustomization::RegisterPrefs(local_state); | 111 chromeos::ApplyServicesCustomization::RegisterPrefs(local_state); |
110 chromeos::SignedSettingsTempStorage::RegisterPrefs(local_state); | 112 chromeos::SignedSettingsTempStorage::RegisterPrefs(local_state); |
111 #endif | 113 #endif |
112 } | 114 } |
(...skipping 29 matching lines...) Expand all Loading... |
142 BrowserWindowGtk::RegisterUserPrefs(user_prefs); | 144 BrowserWindowGtk::RegisterUserPrefs(user_prefs); |
143 #endif | 145 #endif |
144 #if defined(OS_CHROMEOS) | 146 #if defined(OS_CHROMEOS) |
145 chromeos::Preferences::RegisterUserPrefs(user_prefs); | 147 chromeos::Preferences::RegisterUserPrefs(user_prefs); |
146 #endif | 148 #endif |
147 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 149 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
148 SigninManager::RegisterUserPrefs(user_prefs); | 150 SigninManager::RegisterUserPrefs(user_prefs); |
149 TemplateURLModel::RegisterUserPrefs(user_prefs); | 151 TemplateURLModel::RegisterUserPrefs(user_prefs); |
150 InstantController::RegisterUserPrefs(user_prefs); | 152 InstantController::RegisterUserPrefs(user_prefs); |
151 NetPrefObserver::RegisterPrefs(user_prefs); | 153 NetPrefObserver::RegisterPrefs(user_prefs); |
152 policy::ProfilePolicyContext::RegisterUserPrefs(user_prefs); | 154 policy::ProfilePolicyConnector::RegisterPrefs(user_prefs); |
153 } | 155 } |
154 | 156 |
155 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 157 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
156 // Copy pref values which have been migrated to user_prefs from local_state, | 158 // Copy pref values which have been migrated to user_prefs from local_state, |
157 // or remove them from local_state outright, if copying is not required. | 159 // or remove them from local_state outright, if copying is not required. |
158 int current_version = | 160 int current_version = |
159 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 161 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
160 | 162 |
161 if ((current_version & WINDOWS_PREFS) == 0) { | 163 if ((current_version & WINDOWS_PREFS) == 0) { |
162 // Migrate the devtools split location preference. | 164 // Migrate the devtools split location preference. |
(...skipping 14 matching lines...) Expand all Loading... |
177 GetValue())); | 179 GetValue())); |
178 } | 180 } |
179 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 181 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
180 | 182 |
181 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 183 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
182 current_version | WINDOWS_PREFS); | 184 current_version | WINDOWS_PREFS); |
183 } | 185 } |
184 } | 186 } |
185 | 187 |
186 } // namespace browser | 188 } // namespace browser |
OLD | NEW |