Modify-default-preferences.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. From: csagan5 <32685696+csagan5@users.noreply.github.com>
  2. Date: Thu, 12 Oct 2017 08:09:24 +0200
  3. Subject: Modify default preferences
  4. Do not hide component extensions
  5. ---
  6. chrome/browser/background/background_mode_manager.cc | 2 +-
  7. chrome/browser/chrome_content_browser_client.cc | 2 +-
  8. chrome/browser/net/prediction_options.cc | 2 +-
  9. chrome/browser/net/prediction_options.h | 2 +-
  10. chrome/browser/profiles/profile.cc | 2 +-
  11. .../settings/reset_page/reset_profile_dialog.html | 2 +-
  12. chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
  13. chrome/browser/ui/navigation_correction_tab_observer.cc | 2 +-
  14. .../browser/ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
  15. chrome/service/cloud_print/connector_settings.cc | 2 +-
  16. components/autofill/core/browser/autofill_manager.cc | 14 ++++----------
  17. components/autofill/core/common/autofill_prefs.cc | 2 +-
  18. components/bookmarks/browser/bookmark_utils.cc | 4 ++--
  19. components/safe_browsing/common/safe_browsing_prefs.cc | 4 ++--
  20. extensions/common/extension.cc | 8 --------
  21. 15 files changed, 19 insertions(+), 37 deletions(-)
  22. diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
  23. --- a/chrome/browser/background/background_mode_manager.cc
  24. +++ b/chrome/browser/background/background_mode_manager.cc
  25. @@ -301,7 +301,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
  26. registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
  27. registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
  28. #endif
  29. - registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, true);
  30. + registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, false);
  31. }
  32. void BackgroundModeManager::RegisterProfile(Profile* profile) {
  33. diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
  34. --- a/chrome/browser/chrome_content_browser_client.cc
  35. +++ b/chrome/browser/chrome_content_browser_client.cc
  36. @@ -1149,7 +1149,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
  37. void ChromeContentBrowserClient::RegisterProfilePrefs(
  38. user_prefs::PrefRegistrySyncable* registry) {
  39. registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
  40. - registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true);
  41. + registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, false);
  42. registry->RegisterListPref(prefs::kEnableDeprecatedWebPlatformFeatures);
  43. // Register user prefs for mapping SitePerProcess and IsolateOrigins in
  44. // user policy in addition to the same named ones in Local State (which are
  45. diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc
  46. --- a/chrome/browser/net/prediction_options.cc
  47. +++ b/chrome/browser/net/prediction_options.cc
  48. @@ -31,7 +31,7 @@ NetworkPredictionStatus CanPrefetchAndPrerender(
  49. }
  50. return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK;
  51. default:
  52. - DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
  53. + //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
  54. return NetworkPredictionStatus::DISABLED_ALWAYS;
  55. }
  56. }
  57. diff --git a/chrome/browser/net/prediction_options.h b/chrome/browser/net/prediction_options.h
  58. --- a/chrome/browser/net/prediction_options.h
  59. +++ b/chrome/browser/net/prediction_options.h
  60. @@ -22,7 +22,7 @@ enum NetworkPredictionOptions {
  61. NETWORK_PREDICTION_ALWAYS,
  62. NETWORK_PREDICTION_WIFI_ONLY,
  63. NETWORK_PREDICTION_NEVER,
  64. - NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY,
  65. + NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_NEVER,
  66. };
  67. enum class NetworkPredictionStatus {
  68. diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
  69. --- a/chrome/browser/profiles/profile.cc
  70. +++ b/chrome/browser/profiles/profile.cc
  71. @@ -140,7 +140,7 @@ const char Profile::kProfileKey[] = "__PROFILE__";
  72. void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
  73. registry->RegisterBooleanPref(
  74. prefs::kSearchSuggestEnabled,
  75. - true,
  76. + false,
  77. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  78. #if defined(OS_ANDROID)
  79. registry->RegisterStringPref(
  80. diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
  81. --- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
  82. +++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
  83. @@ -50,7 +50,7 @@
  84. </cr-button>
  85. </div>
  86. <div slot="footer">
  87. - <cr-checkbox id="sendSettings" checked>
  88. + <cr-checkbox id="sendSettings">
  89. $i18nRaw{resetPageFeedback}</cr-checkbox>
  90. </div>
  91. </cr-dialog>
  92. diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
  93. --- a/chrome/browser/ui/browser_ui_prefs.cc
  94. +++ b/chrome/browser/ui/browser_ui_prefs.cc
  95. @@ -66,11 +66,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
  96. registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
  97. registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
  98. registry->RegisterBooleanPref(
  99. - prefs::kOfferTranslateEnabled, true,
  100. + prefs::kOfferTranslateEnabled, false,
  101. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  102. registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
  103. registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
  104. - registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true);
  105. + registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false);
  106. registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
  107. registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup);
  108. registry->RegisterDictionaryPref(prefs::kAppWindowPlacement);
  109. diff --git a/chrome/browser/ui/navigation_correction_tab_observer.cc b/chrome/browser/ui/navigation_correction_tab_observer.cc
  110. --- a/chrome/browser/ui/navigation_correction_tab_observer.cc
  111. +++ b/chrome/browser/ui/navigation_correction_tab_observer.cc
  112. @@ -42,7 +42,7 @@ NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {}
  113. // static
  114. void NavigationCorrectionTabObserver::RegisterProfilePrefs(
  115. user_prefs::PrefRegistrySyncable* prefs) {
  116. - prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true,
  117. + prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, false,
  118. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  119. }
  120. diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
  121. --- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
  122. +++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
  123. @@ -107,10 +107,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
  124. user_prefs::PrefRegistrySyncable* registry) {
  125. registry->RegisterBooleanPref(
  126. prefs::kLocalDiscoveryNotificationsEnabled,
  127. -#if defined(OS_WIN)
  128. false,
  129. -#else
  130. - true,
  131. -#endif
  132. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  133. }
  134. diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/cloud_print/connector_settings.cc
  135. --- a/chrome/service/cloud_print/connector_settings.cc
  136. +++ b/chrome/service/cloud_print/connector_settings.cc
  137. @@ -60,7 +60,7 @@ void ConnectorSettings::InitFrom(ServiceProcessPrefs* prefs) {
  138. DCHECK(server_url_.is_valid());
  139. connect_new_printers_ = prefs->GetBoolean(
  140. - prefs::kCloudPrintConnectNewPrinters, true);
  141. + prefs::kCloudPrintConnectNewPrinters, false);
  142. xmpp_ping_enabled_ = prefs->GetBoolean(
  143. prefs::kCloudPrintXmppPingEnabled, false);
  144. diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
  145. --- a/components/autofill/core/browser/autofill_manager.cc
  146. +++ b/components/autofill/core/browser/autofill_manager.cc
  147. @@ -516,10 +516,7 @@ bool AutofillManager::ShouldParseForms(const std::vector<FormData>& forms,
  148. bool enabled = IsAutofillEnabled();
  149. sync_state_ = personal_data_ ? personal_data_->GetSyncSigninState()
  150. : AutofillSyncSigninState::kNumSyncStates;
  151. - if (!has_logged_autofill_enabled_) {
  152. - AutofillMetrics::LogIsAutofillEnabledAtPageLoad(enabled, sync_state_);
  153. - has_logged_autofill_enabled_ = true;
  154. - }
  155. + has_logged_autofill_enabled_ = true;
  156. return enabled;
  157. }
  158. @@ -803,10 +800,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
  159. // suggestions available.
  160. // TODO(mathp): Differentiate between number of suggestions available
  161. // (current metric) and number shown to the user.
  162. - if (!has_logged_address_suggestions_count_) {
  163. - AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
  164. - has_logged_address_suggestions_count_ = true;
  165. - }
  166. + has_logged_address_suggestions_count_ = true;
  167. }
  168. }
  169. @@ -1427,8 +1421,8 @@ void AutofillManager::Reset() {
  170. #if defined(OS_ANDROID) || defined(OS_IOS)
  171. autofill_assistant_.Reset();
  172. #endif
  173. - has_logged_autofill_enabled_ = false;
  174. - has_logged_address_suggestions_count_ = false;
  175. + has_logged_autofill_enabled_ = true;
  176. + has_logged_address_suggestions_count_ = true;
  177. did_show_suggestions_ = false;
  178. user_did_type_ = false;
  179. user_did_autofill_ = false;
  180. diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
  181. --- a/components/autofill/core/common/autofill_prefs.cc
  182. +++ b/components/autofill/core/common/autofill_prefs.cc
  183. @@ -150,7 +150,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
  184. prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
  185. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  186. registry->RegisterBooleanPref(
  187. - prefs::kAutofillCreditCardEnabled, true,
  188. + prefs::kAutofillCreditCardEnabled, false,
  189. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  190. registry->RegisterStringPref(
  191. prefs::kAutofillProfileValidity, "",
  192. diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc
  193. --- a/components/bookmarks/browser/bookmark_utils.cc
  194. +++ b/components/bookmarks/browser/bookmark_utils.cc
  195. @@ -443,12 +443,12 @@ bool DoesBookmarkContainWords(const base::string16& title,
  196. void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
  197. registry->RegisterBooleanPref(
  198. prefs::kShowBookmarkBar,
  199. - false,
  200. + true,
  201. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  202. registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true);
  203. registry->RegisterBooleanPref(
  204. prefs::kShowAppsShortcutInBookmarkBar,
  205. - true,
  206. + false,
  207. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  208. registry->RegisterBooleanPref(
  209. prefs::kShowManagedBookmarksInBookmarkBar,
  210. diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components/safe_browsing/common/safe_browsing_prefs.cc
  211. --- a/components/safe_browsing/common/safe_browsing_prefs.cc
  212. +++ b/components/safe_browsing/common/safe_browsing_prefs.cc
  213. @@ -167,9 +167,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
  214. registry->RegisterBooleanPref(
  215. prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
  216. registry->RegisterBooleanPref(
  217. - prefs::kSafeBrowsingExtendedReportingOptInAllowed, true);
  218. + prefs::kSafeBrowsingExtendedReportingOptInAllowed, false);
  219. registry->RegisterBooleanPref(
  220. - prefs::kSafeBrowsingEnabled, true,
  221. + prefs::kSafeBrowsingEnabled, false,
  222. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  223. registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled,
  224. false);
  225. diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
  226. --- a/extensions/common/extension.cc
  227. +++ b/extensions/common/extension.cc
  228. @@ -365,14 +365,6 @@ bool Extension::ShouldDisplayInExtensionSettings() const {
  229. if (is_theme())
  230. return false;
  231. - // Hide component extensions because they are only extensions as an
  232. - // implementation detail of Chrome.
  233. - if (extensions::Manifest::IsComponentLocation(location()) &&
  234. - !base::CommandLine::ForCurrentProcess()->HasSwitch(
  235. - switches::kShowComponentExtensionOptions)) {
  236. - return false;
  237. - }
  238. -
  239. // Unless they are unpacked, never show hosted apps. Note: We intentionally
  240. // show packaged apps and platform apps because there are some pieces of
  241. // functionality that are only available in chrome://extensions/ but which
  242. --
  243. 2.11.0