OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/prefs/browser_prefs.h" | 5 #include "ios/chrome/browser/prefs/browser_prefs.h" |
6 | 6 |
7 #include "components/autofill/core/browser/autofill_manager.h" | 7 #include "components/autofill/core/browser/autofill_manager.h" |
8 #include "components/browsing_data/core/pref_names.h" | 8 #include "components/browsing_data/core/pref_names.h" |
9 #include "components/content_settings/core/browser/host_content_settings_map.h" | 9 #include "components/content_settings/core/browser/host_content_settings_map.h" |
10 #include "components/dom_distiller/core/distilled_page_prefs.h" | 10 #include "components/dom_distiller/core/distilled_page_prefs.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "components/update_client/update_client.h" | 33 #include "components/update_client/update_client.h" |
34 #include "components/variations/service/variations_service.h" | 34 #include "components/variations/service/variations_service.h" |
35 #include "components/web_resource/web_resource_pref_names.h" | 35 #include "components/web_resource/web_resource_pref_names.h" |
36 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" | 36 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" |
37 #include "ios/chrome/browser/first_run/first_run.h" | 37 #include "ios/chrome/browser/first_run/first_run.h" |
38 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" | 38 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" |
39 #import "ios/chrome/browser/memory/memory_debugger_manager.h" | 39 #import "ios/chrome/browser/memory/memory_debugger_manager.h" |
40 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 40 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
41 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" | 41 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" |
42 #include "ios/chrome/browser/notification_promo.h" | 42 #include "ios/chrome/browser/notification_promo.h" |
| 43 #include "ios/chrome/browser/physical_web/physical_web_prefs_registration.h" |
43 #include "ios/chrome/browser/pref_names.h" | 44 #include "ios/chrome/browser/pref_names.h" |
44 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 45 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
45 #include "ios/chrome/browser/voice/voice_search_prefs_registration.h" | 46 #include "ios/chrome/browser/voice/voice_search_prefs_registration.h" |
46 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 47 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
47 #include "ui/base/l10n/l10n_util.h" | 48 #include "ui/base/l10n/l10n_util.h" |
48 | 49 |
49 void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { | 50 void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { |
50 BrowserStateInfoCache::RegisterPrefs(registry); | 51 BrowserStateInfoCache::RegisterPrefs(registry); |
51 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry); | 52 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry); |
52 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); | 53 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); |
53 ios::SigninManagerFactory::RegisterPrefs(registry); | 54 ios::SigninManagerFactory::RegisterPrefs(registry); |
54 IOSChromeMetricsServiceClient::RegisterPrefs(registry); | 55 IOSChromeMetricsServiceClient::RegisterPrefs(registry); |
55 network_time::NetworkTimeTracker::RegisterPrefs(registry); | 56 network_time::NetworkTimeTracker::RegisterPrefs(registry); |
56 ios::NotificationPromo::RegisterPrefs(registry); | 57 ios::NotificationPromo::RegisterPrefs(registry); |
57 PrefProxyConfigTrackerImpl::RegisterPrefs(registry); | 58 PrefProxyConfigTrackerImpl::RegisterPrefs(registry); |
58 rappor::RapporService::RegisterPrefs(registry); | 59 rappor::RapporService::RegisterPrefs(registry); |
59 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry); | 60 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry); |
60 update_client::RegisterPrefs(registry); | 61 update_client::RegisterPrefs(registry); |
61 variations::VariationsService::RegisterPrefs(registry); | 62 variations::VariationsService::RegisterPrefs(registry); |
| 63 RegisterPhysicalWebLocalStatePrefs(registry); |
62 | 64 |
63 // Preferences related to the browser state manager. | 65 // Preferences related to the browser state manager. |
64 registry->RegisterStringPref(prefs::kBrowserStateLastUsed, std::string()); | 66 registry->RegisterStringPref(prefs::kBrowserStateLastUsed, std::string()); |
65 registry->RegisterIntegerPref(prefs::kBrowserStatesNumCreated, 1); | 67 registry->RegisterIntegerPref(prefs::kBrowserStatesNumCreated, 1); |
66 registry->RegisterListPref(prefs::kBrowserStatesLastActive); | 68 registry->RegisterListPref(prefs::kBrowserStatesLastActive); |
67 | 69 |
68 [OmniboxGeolocationLocalState registerLocalState:registry]; | 70 [OmniboxGeolocationLocalState registerLocalState:registry]; |
69 [MemoryDebuggerManager registerLocalState:registry]; | 71 [MemoryDebuggerManager registerLocalState:registry]; |
70 | 72 |
71 registry->RegisterBooleanPref(prefs::kBrowsingDataMigrationHasBeenPossible, | 73 registry->RegisterBooleanPref(prefs::kBrowsingDataMigrationHasBeenPossible, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 147 } |
146 | 148 |
147 // This method should be periodically pruned of year+ old migrations. | 149 // This method should be periodically pruned of year+ old migrations. |
148 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 150 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
149 // Added 07/2014. | 151 // Added 07/2014. |
150 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 152 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
151 | 153 |
152 // Added 08/2015. | 154 // Added 08/2015. |
153 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 155 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
154 } | 156 } |
OLD | NEW |