Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: ios/chrome/browser/prefs/browser_prefs.mm

Issue 1679283002: Componentize Chrome terms of service, Accept-Languages & default encoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase && use a qualified include for the new file Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/content_settings/core/browser/host_content_settings_map.h" 8 #include "components/content_settings/core/browser/host_content_settings_map.h"
9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
10 #include "components/dom_distiller/core/distilled_page_prefs.h" 10 #include "components/dom_distiller/core/distilled_page_prefs.h"
11 #include "components/flags_ui/pref_service_flags_storage.h" 11 #include "components/flags_ui/pref_service_flags_storage.h"
12 #include "components/gcm_driver/gcm_channel_status_syncer.h" 12 #include "components/gcm_driver/gcm_channel_status_syncer.h"
13 #include "components/network_time/network_time_tracker.h" 13 #include "components/network_time/network_time_tracker.h"
14 #include "components/omnibox/browser/zero_suggest_provider.h" 14 #include "components/omnibox/browser/zero_suggest_provider.h"
15 #include "components/password_manager/core/browser/password_manager.h" 15 #include "components/password_manager/core/browser/password_manager.h"
16 #include "components/pref_registry/pref_registry_syncable.h" 16 #include "components/pref_registry/pref_registry_syncable.h"
17 #include "components/prefs/pref_service.h" 17 #include "components/prefs/pref_service.h"
18 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" 18 #include "components/proxy_config/pref_proxy_config_tracker_impl.h"
19 #include "components/rappor/rappor_service.h" 19 #include "components/rappor/rappor_service.h"
20 #include "components/search_engines/template_url_prepopulate_data.h" 20 #include "components/search_engines/template_url_prepopulate_data.h"
21 #include "components/signin/core/common/signin_pref_names.h" 21 #include "components/signin/core/common/signin_pref_names.h"
22 #include "components/ssl_config/ssl_config_service_manager.h" 22 #include "components/ssl_config/ssl_config_service_manager.h"
23 #include "components/strings/grit/components_locale_settings.h"
23 #include "components/sync_driver/sync_prefs.h" 24 #include "components/sync_driver/sync_prefs.h"
24 #include "components/translate/core/browser/translate_prefs.h" 25 #include "components/translate/core/browser/translate_prefs.h"
25 #include "components/translate/core/common/translate_pref_names.h" 26 #include "components/translate/core/common/translate_pref_names.h"
26 #include "components/variations/service/variations_service.h" 27 #include "components/variations/service/variations_service.h"
27 #include "components/web_resource/promo_resource_service.h" 28 #include "components/web_resource/promo_resource_service.h"
28 #include "ios/chrome/browser/application_context_impl.h" 29 #include "ios/chrome/browser/application_context_impl.h"
29 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h" 30 #include "ios/chrome/browser/browser_state/browser_state_info_cache.h"
30 #include "ios/chrome/browser/first_run/first_run.h" 31 #include "ios/chrome/browser/first_run/first_run.h"
31 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h" 32 #import "ios/chrome/browser/geolocation/omnibox_geolocation_local_state.h"
32 #import "ios/chrome/browser/memory/memory_debugger_manager.h" 33 #import "ios/chrome/browser/memory/memory_debugger_manager.h"
33 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" 34 #import "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h"
34 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h" 35 #include "ios/chrome/browser/net/http_server_properties_manager_factory.h"
35 #include "ios/chrome/browser/pref_names.h" 36 #include "ios/chrome/browser/pref_names.h"
36 #include "ios/chrome/browser/signin/signin_manager_factory.h" 37 #include "ios/chrome/browser/signin/signin_manager_factory.h"
37 #include "ios/chrome/grit/ios_locale_settings.h"
38 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 38 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
39 #include "ui/base/l10n/l10n_util.h" 39 #include "ui/base/l10n/l10n_util.h"
40 40
41 namespace { 41 namespace {
42 42
43 // TODO(crbug.com/525079): those preferences are not used on iOS but are 43 // TODO(crbug.com/525079): those preferences are not used on iOS but are
44 // required to be able to run unit_tests until componentization of 44 // required to be able to run unit_tests until componentization of
45 // chrome/browser/prefs is complete. 45 // chrome/browser/prefs is complete.
46 const char kURLsToRestoreOnStartup[] = "session.startup_urls"; 46 const char kURLsToRestoreOnStartup[] = "session.startup_urls";
47 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup"; 47 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup";
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 web_resource::PromoResourceService::RegisterProfilePrefs(registry); 94 web_resource::PromoResourceService::RegisterProfilePrefs(registry);
95 ZeroSuggestProvider::RegisterProfilePrefs(registry); 95 ZeroSuggestProvider::RegisterProfilePrefs(registry);
96 96
97 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false); 97 registry->RegisterBooleanPref(prefs::kDataSaverEnabled, false);
98 registry->RegisterBooleanPref( 98 registry->RegisterBooleanPref(
99 prefs::kEnableDoNotTrack, false, 99 prefs::kEnableDoNotTrack, false,
100 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 100 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
101 registry->RegisterBooleanPref( 101 registry->RegisterBooleanPref(
102 prefs::kEnableTranslate, true, 102 prefs::kEnableTranslate, true,
103 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 103 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
104 registry->RegisterStringPref( 104 registry->RegisterStringPref(prefs::kAcceptLanguages,
105 prefs::kAcceptLanguages, 105 l10n_util::GetStringUTF8(IDS_ACCEPT_LANGUAGES));
106 l10n_util::GetStringUTF8(IDS_IOS_ACCEPT_LANGUAGES)); 106 registry->RegisterStringPref(prefs::kDefaultCharset,
107 registry->RegisterStringPref( 107 l10n_util::GetStringUTF8(IDS_DEFAULT_ENCODING),
108 prefs::kDefaultCharset, 108 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
109 l10n_util::GetStringUTF8(IDS_IOS_DEFAULT_ENCODING),
110 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
111 registry->RegisterInt64Pref(prefs::kRateThisAppDialogLastShownTime, 0, 109 registry->RegisterInt64Pref(prefs::kRateThisAppDialogLastShownTime, 0,
112 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 110 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
113 registry->RegisterBooleanPref( 111 registry->RegisterBooleanPref(
114 prefs::kNetworkPredictionEnabled, true, 112 prefs::kNetworkPredictionEnabled, true,
115 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 113 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
116 registry->RegisterBooleanPref( 114 registry->RegisterBooleanPref(
117 prefs::kNetworkPredictionWifiOnly, true, 115 prefs::kNetworkPredictionWifiOnly, true,
118 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 116 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
119 registry->RegisterStringPref(prefs::kContextualSearchEnabled, std::string(), 117 registry->RegisterStringPref(prefs::kContextualSearchEnabled, std::string(),
120 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 118 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
(...skipping 21 matching lines...) Expand all
142 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) {} 140 void MigrateObsoleteLocalStatePrefs(PrefService* prefs) {}
143 141
144 // This method should be periodically pruned of year+ old migrations. 142 // This method should be periodically pruned of year+ old migrations.
145 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) { 143 void MigrateObsoleteBrowserStatePrefs(PrefService* prefs) {
146 // Added 07/2014. 144 // Added 07/2014.
147 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages); 145 translate::TranslatePrefs::MigrateUserPrefs(prefs, prefs::kAcceptLanguages);
148 146
149 // Added 08/2015. 147 // Added 08/2015.
150 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId); 148 prefs->ClearPref(::prefs::kSigninSharedAuthenticationUserId);
151 } 149 }
OLDNEW
« no previous file with comments | « components/strings/components_locale_settings_zh-TW.xtb ('k') | ios/chrome/browser/variations/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698