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