| 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/content_settings/core/browser/host_content_settings_map.h" | 9 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 9 #include "components/dom_distiller/core/distilled_page_prefs.h" | 10 #include "components/dom_distiller/core/distilled_page_prefs.h" |
| 10 #include "components/flags_ui/pref_service_flags_storage.h" | 11 #include "components/flags_ui/pref_service_flags_storage.h" |
| 11 #include "components/gcm_driver/gcm_channel_status_syncer.h" | 12 #include "components/gcm_driver/gcm_channel_status_syncer.h" |
| 12 #include "components/network_time/network_time_tracker.h" | 13 #include "components/network_time/network_time_tracker.h" |
| 13 #include "components/ntp_snippets/ntp_snippets_service.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" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // TODO(crbug.com/525079): those preferences are not used on iOS but are | 132 // TODO(crbug.com/525079): those preferences are not used on iOS but are |
| 132 // required to be able to run unit_tests until componentization of | 133 // required to be able to run unit_tests until componentization of |
| 133 // chrome/browser/prefs is complete. | 134 // chrome/browser/prefs is complete. |
| 134 registry->RegisterListPref(kURLsToRestoreOnStartup, | 135 registry->RegisterListPref(kURLsToRestoreOnStartup, |
| 135 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 136 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 136 registry->RegisterListPref(kURLsToRestoreOnStartupOld); | 137 registry->RegisterListPref(kURLsToRestoreOnStartupOld); |
| 137 | 138 |
| 138 // Register prefs used by Clear Browsing Data UI. | 139 // Register prefs used by Clear Browsing Data UI. |
| 139 registry->RegisterIntegerPref( | 140 registry->RegisterIntegerPref( |
| 140 prefs::kClearBrowsingDataHistoryNoticeShownTimes, 0); | 141 prefs::kClearBrowsingDataHistoryNoticeShownTimes, 0); |
| 142 registry->RegisterIntegerPref( |
| 143 browsing_data::prefs::kDeleteTimePeriod, 0, |
| 144 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 141 | 145 |
| 142 ios::GetChromeBrowserProvider()->RegisterProfilePrefs(registry); | 146 ios::GetChromeBrowserProvider()->RegisterProfilePrefs(registry); |
| 143 } | 147 } |
| 144 | 148 |
| 145 // This method should be periodically pruned of year+ old migrations. | 149 // This method should be periodically pruned of year+ old migrations. |
| 146 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) { | 150 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) { |
| 147 // Added 05/2016. | 151 // Added 05/2016. |
| 148 web_resource::PromoResourceService::ClearLocalState(prefs); | 152 web_resource::PromoResourceService::ClearLocalState(prefs); |
| 149 } | 153 } |
| 150 | 154 |
| 151 // This method should be periodically pruned of year+ old migrations. | 155 // This method should be periodically pruned of year+ old migrations. |
| 152 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 156 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
| 153 // Added 07/2014. | 157 // Added 07/2014. |
| 154 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); | 158 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); |
| 155 | 159 |
| 156 // Added 08/2015. | 160 // Added 08/2015. |
| 157 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 161 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
| 158 } | 162 } |
| OLD | NEW |