| 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/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/pref_names.h" | 41 #include "ios/chrome/browser/pref_names.h" |
| 42 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 42 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 43 #include "ios/chrome/browser/voice/voice_search_prefs_registration.h" |
| 43 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 44 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
| 45 | 46 |
| 46 void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { | 47 void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { |
| 47 BrowserStateInfoCache::RegisterPrefs(registry); | 48 BrowserStateInfoCache::RegisterPrefs(registry); |
| 48 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry); | 49 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry); |
| 49 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); | 50 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); |
| 50 ios::SigninManagerFactory::RegisterPrefs(registry); | 51 ios::SigninManagerFactory::RegisterPrefs(registry); |
| 51 IOSChromeMetricsServiceClient::RegisterPrefs(registry); | 52 IOSChromeMetricsServiceClient::RegisterPrefs(registry); |
| 52 network_time::NetworkTimeTracker::RegisterPrefs(registry); | 53 network_time::NetworkTimeTracker::RegisterPrefs(registry); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); | 89 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); |
| 89 ntp_tiles::PopularSites::RegisterProfilePrefs(registry); | 90 ntp_tiles::PopularSites::RegisterProfilePrefs(registry); |
| 90 ios::NotificationPromo::RegisterProfilePrefs(registry); | 91 ios::NotificationPromo::RegisterProfilePrefs(registry); |
| 91 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 92 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
| 92 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); | 93 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); |
| 93 syncer::SyncPrefs::RegisterProfilePrefs(registry); | 94 syncer::SyncPrefs::RegisterProfilePrefs(registry); |
| 94 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 95 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
| 95 translate::TranslatePrefs::RegisterProfilePrefs(registry); | 96 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
| 96 variations::VariationsService::RegisterProfilePrefs(registry); | 97 variations::VariationsService::RegisterProfilePrefs(registry); |
| 97 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 98 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
| 99 RegisterVoiceSearchBrowserStatePrefs(registry); |
| 98 | 100 |
| 99 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); | 101 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); |
| 100 registry->RegisterBooleanPref( | 102 registry->RegisterBooleanPref( |
| 101 prefs::kEnableDoNotTrack, false, | 103 prefs::kEnableDoNotTrack, false, |
| 102 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 104 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 103 registry->RegisterBooleanPref( | 105 registry->RegisterBooleanPref( |
| 104 prefs::kEnableTranslate, true, | 106 prefs::kEnableTranslate, true, |
| 105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 107 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 106 registry->RegisterStringPref(prefs::kAcceptLanguages, | 108 registry->RegisterStringPref(prefs::kAcceptLanguages, |
| 107 l10n_util::GetStringUTF8(IDS_ACCEPT_LANGUAGES)); | 109 l10n_util::GetStringUTF8(IDS_ACCEPT_LANGUAGES)); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 141 } |
| 140 | 142 |
| 141 // This method should be periodically pruned of year+ old migrations. | 143 // This method should be periodically pruned of year+ old migrations. |
| 142 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 144 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
| 143 // Added 07/2014. | 145 // Added 07/2014. |
| 144 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 146 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 145 | 147 |
| 146 // Added 08/2015. | 148 // Added 08/2015. |
| 147 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 149 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
| 148 } | 150 } |
| OLD | NEW |