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/content_settings/core/browser/host_content_settings_map.h" | 8 #include "components/content_settings/core/browser/host_content_settings_map.h" |
9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
10 #include "components/dom_distiller/core/distilled_page_prefs.h" | 10 #include "components/dom_distiller/core/distilled_page_prefs.h" |
11 #include "components/flags_ui/pref_service_flags_storage.h" | 11 #include "components/flags_ui/pref_service_flags_storage.h" |
12 #include "components/gcm_driver/gcm_channel_status_syncer.h" | 12 #include "components/gcm_driver/gcm_channel_status_syncer.h" |
13 #include "components/network_time/network_time_tracker.h" | 13 #include "components/network_time/network_time_tracker.h" |
| 14 #include "components/ntp_snippets/ntp_snippets_service.h" |
14 #include "components/omnibox/browser/zero_suggest_provider.h" | 15 #include "components/omnibox/browser/zero_suggest_provider.h" |
15 #include "components/password_manager/core/browser/password_manager.h" | 16 #include "components/password_manager/core/browser/password_manager.h" |
16 #include "components/pref_registry/pref_registry_syncable.h" | 17 #include "components/pref_registry/pref_registry_syncable.h" |
17 #include "components/prefs/pref_service.h" | 18 #include "components/prefs/pref_service.h" |
18 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 19 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
19 #include "components/rappor/rappor_service.h" | 20 #include "components/rappor/rappor_service.h" |
20 #include "components/search_engines/template_url_prepopulate_data.h" | 21 #include "components/search_engines/template_url_prepopulate_data.h" |
21 #include "components/signin/core/common/signin_pref_names.h" | 22 #include "components/signin/core/common/signin_pref_names.h" |
22 #include "components/ssl_config/ssl_config_service_manager.h" | 23 #include "components/ssl_config/ssl_config_service_manager.h" |
23 #include "components/strings/grit/components_locale_settings.h" | 24 #include "components/strings/grit/components_locale_settings.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 79 } |
79 | 80 |
80 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { | 81 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { |
81 autofill::AutofillManager::RegisterProfilePrefs(registry); | 82 autofill::AutofillManager::RegisterProfilePrefs(registry); |
82 data_reduction_proxy::RegisterSyncableProfilePrefs(registry); | 83 data_reduction_proxy::RegisterSyncableProfilePrefs(registry); |
83 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); | 84 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); |
84 FirstRun::RegisterProfilePrefs(registry); | 85 FirstRun::RegisterProfilePrefs(registry); |
85 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 86 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
86 HostContentSettingsMap::RegisterProfilePrefs(registry); | 87 HostContentSettingsMap::RegisterProfilePrefs(registry); |
87 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); | 88 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); |
| 89 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry); |
88 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 90 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
89 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); | 91 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); |
90 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); | 92 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); |
91 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 93 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
92 translate::TranslatePrefs::RegisterProfilePrefs(registry); | 94 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
93 variations::VariationsService::RegisterProfilePrefs(registry); | 95 variations::VariationsService::RegisterProfilePrefs(registry); |
94 web_resource::PromoResourceService::RegisterProfilePrefs(registry); | 96 web_resource::PromoResourceService::RegisterProfilePrefs(registry); |
95 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 97 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
96 | 98 |
97 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); | 99 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) {} | 142 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) {} |
141 | 143 |
142 // This method should be periodically pruned of year+ old migrations. | 144 // This method should be periodically pruned of year+ old migrations. |
143 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 145 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
144 // Added 07/2014. | 146 // Added 07/2014. |
145 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 147 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
146 | 148 |
147 // Added 08/2015. | 149 // Added 08/2015. |
148 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 150 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
149 } | 151 } |
OLD | NEW |