| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "components/autofill/core/browser/autofill_manager.h" | 8 #include "components/autofill/core/browser/autofill_manager.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/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
| 11 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_
names.h" |
| 10 #include "components/dom_distiller/core/distilled_page_prefs.h" | 12 #include "components/dom_distiller/core/distilled_page_prefs.h" |
| 11 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h" | 13 #include "components/enhanced_bookmarks/bookmark_server_cluster_service.h" |
| 12 #include "components/gcm_driver/gcm_channel_status_syncer.h" | 14 #include "components/gcm_driver/gcm_channel_status_syncer.h" |
| 13 #include "components/network_time/network_time_tracker.h" | 15 #include "components/network_time/network_time_tracker.h" |
| 14 #include "components/omnibox/browser/zero_suggest_provider.h" | 16 #include "components/omnibox/browser/zero_suggest_provider.h" |
| 15 #include "components/password_manager/core/browser/password_manager.h" | 17 #include "components/password_manager/core/browser/password_manager.h" |
| 16 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 17 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 19 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
| 18 #include "components/rappor/rappor_service.h" | 20 #include "components/rappor/rappor_service.h" |
| 19 #include "components/search_engines/template_url_prepopulate_data.h" | 21 #include "components/search_engines/template_url_prepopulate_data.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 69 |
| 68 // Preferences related to the browser state manager. | 70 // Preferences related to the browser state manager. |
| 69 registry->RegisterStringPref(ios::prefs::kBrowserStateLastUsed, | 71 registry->RegisterStringPref(ios::prefs::kBrowserStateLastUsed, |
| 70 std::string()); | 72 std::string()); |
| 71 registry->RegisterIntegerPref(ios::prefs::kBrowserStatesNumCreated, 1); | 73 registry->RegisterIntegerPref(ios::prefs::kBrowserStatesNumCreated, 1); |
| 72 registry->RegisterListPref(ios::prefs::kBrowserStatesLastActive); | 74 registry->RegisterListPref(ios::prefs::kBrowserStatesLastActive); |
| 73 | 75 |
| 74 [OmniboxGeolocationLocalState registerLocalState:registry]; | 76 [OmniboxGeolocationLocalState registerLocalState:registry]; |
| 75 [MemoryDebuggerManager registerLocalState:registry]; | 77 [MemoryDebuggerManager registerLocalState:registry]; |
| 76 | 78 |
| 79 // TODO(crbug.com/557814): data_reduction_proxy::prefs::kDataReductionProxy |
| 80 // should be registered by data_reduction_proxy::RegisterPrefs() instead of |
| 81 // here. |
| 82 registry->RegisterStringPref(data_reduction_proxy::prefs::kDataReductionProxy, |
| 83 std::string()); |
| 84 data_reduction_proxy::RegisterPrefs(registry); |
| 85 |
| 77 // TODO(shreyasv): Remove this in M49 as almost all users would have the | 86 // TODO(shreyasv): Remove this in M49 as almost all users would have the |
| 78 // "do not backup" bit set by then. crbug.com/489865. | 87 // "do not backup" bit set by then. crbug.com/489865. |
| 79 registry->RegisterBooleanPref(prefs::kOTRStashStatePathSystemBackupExcluded, | 88 registry->RegisterBooleanPref(prefs::kOTRStashStatePathSystemBackupExcluded, |
| 80 false); | 89 false); |
| 81 registry->RegisterBooleanPref(prefs::kBrowsingDataMigrationHasBeenPossible, | 90 registry->RegisterBooleanPref(prefs::kBrowsingDataMigrationHasBeenPossible, |
| 82 false); | 91 false); |
| 83 | 92 |
| 84 ApplicationContextImpl::RegisterPrefs(registry); | 93 ApplicationContextImpl::RegisterPrefs(registry); |
| 85 | 94 |
| 86 ios::GetChromeBrowserProvider()->RegisterLocalState(registry); | 95 ios::GetChromeBrowserProvider()->RegisterLocalState(registry); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 153 |
| 145 // This method should be periodically pruned of year+ old migrations. | 154 // This method should be periodically pruned of year+ old migrations. |
| 146 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { | 155 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { |
| 147 // Added 07/2014. | 156 // Added 07/2014. |
| 148 translate::TranslatePrefs::MigrateUserPrefs(prefs, | 157 translate::TranslatePrefs::MigrateUserPrefs(prefs, |
| 149 ios::prefs::kAcceptLanguages); | 158 ios::prefs::kAcceptLanguages); |
| 150 | 159 |
| 151 // Added 08/2015. | 160 // Added 08/2015. |
| 152 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); | 161 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); |
| 153 } | 162 } |
| OLD | NEW |