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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 177 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
177 SigninManager::RegisterUserPrefs(user_prefs); | 178 SigninManager::RegisterUserPrefs(user_prefs); |
178 TemplateURLService::RegisterUserPrefs(user_prefs); | 179 TemplateURLService::RegisterUserPrefs(user_prefs); |
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 |
| 187 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 188 policy::URLBlacklistManager::RegisterPrefs(user_prefs); |
| 189 #endif |
186 } | 190 } |
187 | 191 |
188 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 192 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
189 // Copy pref values which have been migrated to user_prefs from local_state, | 193 // Copy pref values which have been migrated to user_prefs from local_state, |
190 // or remove them from local_state outright, if copying is not required. | 194 // or remove them from local_state outright, if copying is not required. |
191 int current_version = | 195 int current_version = |
192 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 196 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
193 | 197 |
194 if ((current_version & WINDOWS_PREFS) == 0) { | 198 if ((current_version & WINDOWS_PREFS) == 0) { |
195 // Migrate the devtools split location preference. | 199 // Migrate the devtools split location preference. |
(...skipping 13 matching lines...) Expand all Loading... |
209 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 213 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
210 } | 214 } |
211 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 215 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
212 | 216 |
213 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 217 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
214 current_version | WINDOWS_PREFS); | 218 current_version | WINDOWS_PREFS); |
215 } | 219 } |
216 } | 220 } |
217 | 221 |
218 } // namespace browser | 222 } // namespace browser |
OLD | NEW |