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" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "chrome/browser/net/net_pref_observer.h" | 29 #include "chrome/browser/net/net_pref_observer.h" |
30 #include "chrome/browser/net/predictor_api.h" | 30 #include "chrome/browser/net/predictor_api.h" |
31 #include "chrome/browser/net/pref_proxy_config_service.h" | 31 #include "chrome/browser/net/pref_proxy_config_service.h" |
32 #include "chrome/browser/net/ssl_config_service_manager.h" | 32 #include "chrome/browser/net/ssl_config_service_manager.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/plugin_prefs.h" | 37 #include "chrome/browser/plugin_prefs.h" |
38 #include "chrome/browser/policy/cloud_policy_subsystem.h" | 38 #include "chrome/browser/policy/cloud_policy_subsystem.h" |
| 39 #include "chrome/browser/policy/url_blacklist_manager.h" |
39 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 40 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
40 #include "chrome/browser/prefs/session_startup_pref.h" | 41 #include "chrome/browser/prefs/session_startup_pref.h" |
41 #include "chrome/browser/printing/print_job_manager.h" | 42 #include "chrome/browser/printing/print_job_manager.h" |
42 #include "chrome/browser/profiles/profile_impl.h" | 43 #include "chrome/browser/profiles/profile_impl.h" |
43 #include "chrome/browser/profiles/profile_info_cache.h" | 44 #include "chrome/browser/profiles/profile_info_cache.h" |
44 #include "chrome/browser/profiles/profile_manager.h" | 45 #include "chrome/browser/profiles/profile_manager.h" |
45 #include "chrome/browser/remoting/firewall_traversal_observer.h" | 46 #include "chrome/browser/remoting/firewall_traversal_observer.h" |
46 #include "chrome/browser/renderer_host/web_cache_manager.h" | 47 #include "chrome/browser/renderer_host/web_cache_manager.h" |
47 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 48 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
48 #include "chrome/browser/search_engines/template_url_service.h" | 49 #include "chrome/browser/search_engines/template_url_service.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 176 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
176 SigninManager::RegisterUserPrefs(user_prefs); | 177 SigninManager::RegisterUserPrefs(user_prefs); |
177 TemplateURLService::RegisterUserPrefs(user_prefs); | 178 TemplateURLService::RegisterUserPrefs(user_prefs); |
178 InstantController::RegisterUserPrefs(user_prefs); | 179 InstantController::RegisterUserPrefs(user_prefs); |
179 NetPrefObserver::RegisterPrefs(user_prefs); | 180 NetPrefObserver::RegisterPrefs(user_prefs); |
180 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); | 181 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); |
181 FirewallTraversalObserver::RegisterUserPrefs(user_prefs); | 182 FirewallTraversalObserver::RegisterUserPrefs(user_prefs); |
182 #if defined(OS_MACOSX) | 183 #if defined(OS_MACOSX) |
183 PresentationModePrefs::RegisterUserPrefs(user_prefs); | 184 PresentationModePrefs::RegisterUserPrefs(user_prefs); |
184 #endif | 185 #endif |
| 186 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 187 policy::URLBlacklistManager::RegisterPrefs(user_prefs); |
| 188 #endif |
185 } | 189 } |
186 | 190 |
187 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 191 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
188 // Copy pref values which have been migrated to user_prefs from local_state, | 192 // Copy pref values which have been migrated to user_prefs from local_state, |
189 // or remove them from local_state outright, if copying is not required. | 193 // or remove them from local_state outright, if copying is not required. |
190 int current_version = | 194 int current_version = |
191 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 195 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
192 | 196 |
193 if ((current_version & WINDOWS_PREFS) == 0) { | 197 if ((current_version & WINDOWS_PREFS) == 0) { |
194 // Migrate the devtools split location preference. | 198 // Migrate the devtools split location preference. |
(...skipping 13 matching lines...) Expand all Loading... |
208 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 212 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
209 } | 213 } |
210 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 214 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
211 | 215 |
212 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 216 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
213 current_version | WINDOWS_PREFS); | 217 current_version | WINDOWS_PREFS); |
214 } | 218 } |
215 } | 219 } |
216 | 220 |
217 } // namespace browser | 221 } // namespace browser |
OLD | NEW |