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" |
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 #import "components/handoff/handoff_manager.h" | 13 #import "components/handoff/handoff_manager.h" |
14 #include "components/metrics/metrics_pref_names.h" | 14 #include "components/metrics/metrics_pref_names.h" |
15 #include "components/network_time/network_time_tracker.h" | 15 #include "components/network_time/network_time_tracker.h" |
16 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" | |
17 #include "components/ntp_snippets/category_rankers/click_based_category_ranker.h
" | 16 #include "components/ntp_snippets/category_rankers/click_based_category_ranker.h
" |
18 #include "components/ntp_snippets/content_suggestions_service.h" | 17 #include "components/ntp_snippets/content_suggestions_service.h" |
19 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h" | 18 #include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h" |
20 #include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h" | 19 #include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h" |
21 #include "components/ntp_snippets/remote/request_throttler.h" | 20 #include "components/ntp_snippets/remote/request_throttler.h" |
22 #include "components/ntp_snippets/user_classifier.h" | 21 #include "components/ntp_snippets/user_classifier.h" |
23 #include "components/ntp_tiles/most_visited_sites.h" | 22 #include "components/ntp_tiles/most_visited_sites.h" |
24 #include "components/ntp_tiles/popular_sites_impl.h" | 23 #include "components/ntp_tiles/popular_sites_impl.h" |
25 #include "components/omnibox/browser/zero_suggest_provider.h" | 24 #include "components/omnibox/browser/zero_suggest_provider.h" |
26 #include "components/password_manager/core/browser/password_manager.h" | 25 #include "components/password_manager/core/browser/password_manager.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); | 89 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); |
91 } | 90 } |
92 | 91 |
93 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { | 92 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { |
94 autofill::AutofillManager::RegisterProfilePrefs(registry); | 93 autofill::AutofillManager::RegisterProfilePrefs(registry); |
95 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); | 94 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); |
96 FirstRun::RegisterProfilePrefs(registry); | 95 FirstRun::RegisterProfilePrefs(registry); |
97 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 96 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
98 HostContentSettingsMap::RegisterProfilePrefs(registry); | 97 HostContentSettingsMap::RegisterProfilePrefs(registry); |
99 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); | 98 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); |
100 ntp_snippets::BookmarkSuggestionsProvider::RegisterProfilePrefs(registry); | |
101 ntp_snippets::ClickBasedCategoryRanker::RegisterProfilePrefs(registry); | 99 ntp_snippets::ClickBasedCategoryRanker::RegisterProfilePrefs(registry); |
102 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry); | 100 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry); |
103 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry); | 101 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry); |
104 ntp_snippets::RemoteSuggestionsSchedulerImpl::RegisterProfilePrefs(registry); | 102 ntp_snippets::RemoteSuggestionsSchedulerImpl::RegisterProfilePrefs(registry); |
105 ntp_snippets::RequestThrottler::RegisterProfilePrefs(registry); | 103 ntp_snippets::RequestThrottler::RegisterProfilePrefs(registry); |
106 ntp_snippets::UserClassifier::RegisterProfilePrefs(registry); | 104 ntp_snippets::UserClassifier::RegisterProfilePrefs(registry); |
107 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); | 105 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); |
108 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry); | 106 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry); |
109 ios::NotificationPromo::RegisterProfilePrefs(registry); | 107 ios::NotificationPromo::RegisterProfilePrefs(registry); |
110 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 108 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 160 } |
163 | 161 |
164 // This method should be periodically pruned of year+ old migrations. | 162 // This method should be periodically pruned of year+ old migrations. |
165 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 163 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
166 // Added 07/2014. | 164 // Added 07/2014. |
167 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 165 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
168 | 166 |
169 // Added 08/2015. | 167 // Added 08/2015. |
170 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 168 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
171 } | 169 } |
OLD | NEW |