| 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/variations/service/variations_service.h" | 31 #include "components/variations/service/variations_service.h" |
| 32 #include "ios/chrome/browser/application_context_impl.h" | 32 #include "ios/chrome/browser/application_context_impl.h" |
| 33 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" | 33 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" |
| 34 #include "ios/chrome/browser/first_run/first_run.h" | 34 #include "ios/chrome/browser/first_run/first_run.h" |
| 35 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" | 35 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" |
| 36 #import "ios/chrome/browser/memory/memory_debugger_manager.h" | 36 #import "ios/chrome/browser/memory/memory_debugger_manager.h" |
| 37 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 37 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
| 38 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" | 38 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" |
| 39 #include "ios/chrome/browser/notification_promo.h" | 39 #include "ios/chrome/browser/notification_promo.h" |
| 40 #include "ios/chrome/browser/pref_names.h" | 40 #include "ios/chrome/browser/pref_names.h" |
| 41 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" |
| 41 #include "ios/chrome/browser/signin/signin_manager_factory.h" | 42 #include "ios/chrome/browser/signin/signin_manager_factory.h" |
| 42 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 43 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 43 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 44 | 45 |
| 45 namespace { | 46 namespace { |
| 46 | 47 |
| 47 // TODO(crbug.com/525079): those preferences are not used on iOS but are | 48 // TODO(crbug.com/525079): those preferences are not used on iOS but are |
| 48 // required to be able to run unit_tests until componentization of | 49 // required to be able to run unit_tests until componentization of |
| 49 // chrome/browser/prefs is complete. | 50 // chrome/browser/prefs is complete. |
| 50 const char kURLsToRestoreOnStartup[] = "session.startup_urls"; | 51 const char kURLsToRestoreOnStartup[] = "session.startup_urls"; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 FirstRun::RegisterProfilePrefs(registry); | 87 FirstRun::RegisterProfilePrefs(registry); |
| 87 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 88 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
| 88 HostContentSettingsMap::RegisterProfilePrefs(registry); | 89 HostContentSettingsMap::RegisterProfilePrefs(registry); |
| 89 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); | 90 HttpServerPropertiesManagerFactory::RegisterProfilePrefs(registry); |
| 90 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry); | 91 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry); |
| 91 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); | 92 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry); |
| 92 ntp_tiles::PopularSites::RegisterProfilePrefs(registry); | 93 ntp_tiles::PopularSites::RegisterProfilePrefs(registry); |
| 93 ios::NotificationPromo::RegisterProfilePrefs(registry); | 94 ios::NotificationPromo::RegisterProfilePrefs(registry); |
| 94 password_manager::PasswordManager::RegisterProfilePrefs(registry); | 95 password_manager::PasswordManager::RegisterProfilePrefs(registry); |
| 95 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); | 96 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry); |
| 97 ReadingListModelFactory::RegisterProfilePrefs(registry); |
| 96 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); | 98 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); |
| 97 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 99 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
| 98 translate::TranslatePrefs::RegisterProfilePrefs(registry); | 100 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
| 99 variations::VariationsService::RegisterProfilePrefs(registry); | 101 variations::VariationsService::RegisterProfilePrefs(registry); |
| 100 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 102 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
| 101 | 103 |
| 102 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); | 104 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); |
| 103 registry->RegisterBooleanPref( | 105 registry->RegisterBooleanPref( |
| 104 prefs::kEnableDoNotTrack, false, | 106 prefs::kEnableDoNotTrack, false, |
| 105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 107 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 } | 151 } |
| 150 | 152 |
| 151 // This method should be periodically pruned of year+ old migrations. | 153 // This method should be periodically pruned of year+ old migrations. |
| 152 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 154 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
| 153 // Added 07/2014. | 155 // Added 07/2014. |
| 154 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 156 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 155 | 157 |
| 156 // Added 08/2015. | 158 // Added 08/2015. |
| 157 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 159 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
| 158 } | 160 } |
| OLD | NEW |