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