Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 #include "components/signin/core/common/signin_pref_names.h" | 29 #include "components/signin/core/common/signin_pref_names.h" |
| 30 #include "components/ssl_config/ssl_config_service_manager.h" | 30 #include "components/ssl_config/ssl_config_service_manager.h" |
| 31 #include "components/strings/grit/components_locale_settings.h" | 31 #include "components/strings/grit/components_locale_settings.h" |
| 32 #include "components/sync/base/sync_prefs.h" | 32 #include "components/sync/base/sync_prefs.h" |
| 33 #include "components/translate/core/browser/translate_prefs.h" | 33 #include "components/translate/core/browser/translate_prefs.h" |
| 34 #include "components/translate/core/common/translate_pref_names.h" | 34 #include "components/translate/core/common/translate_pref_names.h" |
| 35 #include "components/update_client/update_client.h" | 35 #include "components/update_client/update_client.h" |
| 36 #include "components/variations/service/variations_service.h" | 36 #include "components/variations/service/variations_service.h" |
| 37 #include "components/web_resource/web_resource_pref_names.h" | 37 #include "components/web_resource/web_resource_pref_names.h" |
| 38 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" | 38 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" |
| 39 #include "ios/chrome/browser/desktop_promotion/desktop_promotion_prefs.h" | |
| 39 #include "ios/chrome/browser/first_run/first_run.h" | 40 #include "ios/chrome/browser/first_run/first_run.h" |
| 40 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" | 41 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" |
| 41 #import "ios/chrome/browser/memory/memory_debugger_manager.h" | 42 #import "ios/chrome/browser/memory/memory_debugger_manager.h" |
| 42 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 43 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
| 43 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" | 44 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" |
| 44 #include "ios/chrome/browser/notification_promo.h" | 45 #include "ios/chrome/browser/notification_promo.h" |
| 45 #include "ios/chrome/browser/physical_web/physical_web_prefs_registration.h" | 46 #include "ios/chrome/browser/physical_web/physical_web_prefs_registration.h" |
| 46 #include "ios/chrome/browser/pref_names.h" | 47 #include "ios/chrome/browser/pref_names.h" |
| 47 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 48 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 48 #import "ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h" | 49 #import "ios/chrome/browser/ui/bookmarks/bookmark_interaction_controller.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 82 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
| 82 registry->RegisterBooleanPref(prefs::kEulaAccepted, false); | 83 registry->RegisterBooleanPref(prefs::kEulaAccepted, false); |
| 83 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, | 84 registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, |
| 84 false); | 85 false); |
| 85 registry->RegisterBooleanPref(prefs::kLastSessionExitedCleanly, true); | 86 registry->RegisterBooleanPref(prefs::kLastSessionExitedCleanly, true); |
| 86 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); | 87 registry->RegisterBooleanPref(prefs::kMetricsReportingWifiOnly, true); |
| 87 } | 88 } |
| 88 | 89 |
| 89 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { | 90 void RegisterBrowserStatePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 90 autofill::AutofillManager::RegisterProfilePrefs(registry); | 91 autofill::AutofillManager::RegisterProfilePrefs(registry); |
| 92 desktop_ios_promotion::RegisterDesktopPromotionUserPrefs(registry); | |
| 91 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); | 93 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry); |
| 92 FirstRun::RegisterProfilePrefs(registry); | 94 FirstRun::RegisterProfilePrefs(registry); |
| 93 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 95 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
| 94 HostContentSettingsMap::RegisterProfilePrefs(registry); | 96 HostContentSettingsMap::RegisterProfilePrefs(registry); |
| 95 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); | 97 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); |
| 96 ntp_snippets::BookmarkSuggestionsProvider::RegisterProfilePrefs(registry); | 98 ntp_snippets::BookmarkSuggestionsProvider::RegisterProfilePrefs(registry); |
| 97 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry); | 99 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry); |
| 98 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry); | 100 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry); |
| 99 ntp_snippets::SchedulingRemoteSuggestionsProvider::RegisterProfilePrefs( | 101 ntp_snippets::SchedulingRemoteSuggestionsProvider::RegisterProfilePrefs( |
| 100 registry); | 102 registry); |
| 101 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); | 103 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); |
| 102 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry); | 104 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry); |
| 103 ios::NotificationPromo::RegisterProfilePrefs(registry); | 105 ios::NotificationPromo::RegisterProfilePrefs(registry); |
| 104 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 106 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
| 105 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); | 107 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); |
| 106 syncer::SyncPrefs::RegisterProfilePrefs(registry); | 108 syncer::SyncPrefs::RegisterProfilePrefs(registry); |
| 107 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 109 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
| 108 translate::TranslatePrefs::RegisterProfilePrefs(registry); | 110 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
| 109 variations::VariationsService::RegisterProfilePrefs(registry); | 111 variations::VariationsService::RegisterProfilePrefs(registry); |
| 110 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 112 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
| 111 RegisterVoiceSearchBrowserStatePrefs(registry); | 113 RegisterVoiceSearchBrowserStatePrefs(registry); |
|
rohitrao (ping after 24h)
2017/01/23 20:31:39
This is an example of the naming scheme I was sugg
mrefaat
2017/01/24 19:57:20
Acknowledged.
| |
| 112 | 114 |
| 113 [BookmarkInteractionController registerBrowserStatePrefs:registry]; | 115 [BookmarkInteractionController registerBrowserStatePrefs:registry]; |
| 114 [BookmarkPromoController registerBrowserStatePrefs:registry]; | 116 [BookmarkPromoController registerBrowserStatePrefs:registry]; |
| 115 [HandoffManager registerBrowserStatePrefs:registry]; | 117 [HandoffManager registerBrowserStatePrefs:registry]; |
| 116 | 118 |
| 117 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); | 119 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); |
| 118 registry->RegisterBooleanPref( | 120 registry->RegisterBooleanPref( |
| 119 prefs::kEnableDoNotTrack, false, | 121 prefs::kEnableDoNotTrack, false, |
| 120 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 122 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 121 registry->RegisterBooleanPref( | 123 registry->RegisterBooleanPref( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 } | 157 } |
| 156 | 158 |
| 157 // This method should be periodically pruned of year+ old migrations. | 159 // This method should be periodically pruned of year+ old migrations. |
| 158 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 160 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
| 159 // Added 07/2014. | 161 // Added 07/2014. |
| 160 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 162 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 161 | 163 |
| 162 // Added 08/2015. | 164 // Added 08/2015. |
| 163 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 165 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
| 164 } | 166 } |
| OLD | NEW |