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_tab_helper.h" | 46 #include "chrome/browser/remoting/firewall_traversal_tab_helper.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 BackgroundContentsService::RegisterUserPrefs(user_prefs); | 178 BackgroundContentsService::RegisterUserPrefs(user_prefs); |
178 SigninManager::RegisterUserPrefs(user_prefs); | 179 SigninManager::RegisterUserPrefs(user_prefs); |
179 TemplateURLService::RegisterUserPrefs(user_prefs); | 180 TemplateURLService::RegisterUserPrefs(user_prefs); |
180 InstantController::RegisterUserPrefs(user_prefs); | 181 InstantController::RegisterUserPrefs(user_prefs); |
181 NetPrefObserver::RegisterPrefs(user_prefs); | 182 NetPrefObserver::RegisterPrefs(user_prefs); |
182 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); | 183 ProtocolHandlerRegistry::RegisterPrefs(user_prefs); |
183 FirewallTraversalTabHelper::RegisterUserPrefs(user_prefs); | 184 FirewallTraversalTabHelper::RegisterUserPrefs(user_prefs); |
184 #if defined(OS_MACOSX) | 185 #if defined(OS_MACOSX) |
185 PresentationModePrefs::RegisterUserPrefs(user_prefs); | 186 PresentationModePrefs::RegisterUserPrefs(user_prefs); |
186 #endif | 187 #endif |
| 188 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 189 policy::URLBlacklistManager::RegisterPrefs(user_prefs); |
| 190 #endif |
187 } | 191 } |
188 | 192 |
189 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { | 193 void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) { |
190 // 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, |
191 // 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. |
192 int current_version = | 196 int current_version = |
193 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); | 197 local_state->GetInteger(prefs::kMultipleProfilePrefMigration); |
194 | 198 |
195 if ((current_version & WINDOWS_PREFS) == 0) { | 199 if ((current_version & WINDOWS_PREFS) == 0) { |
196 // Migrate the devtools split location preference. | 200 // Migrate the devtools split location preference. |
(...skipping 13 matching lines...) Expand all Loading... |
210 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); | 214 user_prefs->Set(prefs::kBrowserWindowPlacement, *(pref->GetValue())); |
211 } | 215 } |
212 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 216 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
213 | 217 |
214 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 218 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
215 current_version | WINDOWS_PREFS); | 219 current_version | WINDOWS_PREFS); |
216 } | 220 } |
217 } | 221 } |
218 | 222 |
219 } // namespace browser | 223 } // namespace browser |
OLD | NEW |