bromite/build/patches/Modify-default-preferences.patch
2020-05-13 19:34:31 +02:00

222 lines
11 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat, 2 May 2020 00:25:25 +0200
Subject: Modify default preferences
---
chrome/browser/background/background_mode_manager.cc | 2 +-
chrome/browser/chrome_content_browser_client.cc | 2 +-
chrome/browser/net/prediction_options.cc | 2 +-
chrome/browser/net/prediction_options.h | 2 +-
chrome/browser/profiles/profile.cc | 2 +-
.../settings/reset_page/reset_profile_dialog.html | 2 +-
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
chrome/browser/ui/navigation_correction_tab_observer.cc | 2 +-
.../ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
chrome/service/cloud_print/connector_settings.cc | 2 +-
components/autofill/core/browser/autofill_manager.cc | 9 +++------
components/autofill/core/common/autofill_prefs.cc | 2 +-
components/bookmarks/browser/bookmark_utils.cc | 4 ++--
.../safe_browsing/core/common/safe_browsing_prefs.cc | 4 ++--
14 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -310,7 +310,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
#endif
- registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, true);
+ registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, false);
}
void BackgroundModeManager::RegisterProfile(Profile* profile) {
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1178,7 +1178,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
- registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true);
+ registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, false);
registry->RegisterListPref(prefs::kEnableDeprecatedWebPlatformFeatures);
// Register user prefs for mapping SitePerProcess and IsolateOrigins in
// user policy in addition to the same named ones in Local State (which are
diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc
--- a/chrome/browser/net/prediction_options.cc
+++ b/chrome/browser/net/prediction_options.cc
@@ -31,7 +31,7 @@ NetworkPredictionStatus CanPrefetchAndPrerender(
}
return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK;
default:
- DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
+ //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
return NetworkPredictionStatus::DISABLED_ALWAYS;
}
}
diff --git a/chrome/browser/net/prediction_options.h b/chrome/browser/net/prediction_options.h
--- a/chrome/browser/net/prediction_options.h
+++ b/chrome/browser/net/prediction_options.h
@@ -22,7 +22,7 @@ enum NetworkPredictionOptions {
NETWORK_PREDICTION_ALWAYS,
NETWORK_PREDICTION_WIFI_ONLY,
NETWORK_PREDICTION_NEVER,
- NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY,
+ NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_NEVER,
};
enum class NetworkPredictionStatus {
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -184,7 +184,7 @@ const char Profile::kProfileKey[] = "__PROFILE__";
void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kSearchSuggestEnabled,
- true,
+ false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
#if defined(OS_ANDROID)
registry->RegisterStringPref(
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
@@ -51,7 +51,7 @@
</cr-button>
</div>
<div slot="footer">
- <cr-checkbox id="sendSettings" checked>
+ <cr-checkbox id="sendSettings">
$i18nRaw{resetPageFeedback}</cr-checkbox>
</div>
</cr-dialog>
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -67,11 +67,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
registry->RegisterBooleanPref(
- prefs::kOfferTranslateEnabled, true,
+ prefs::kOfferTranslateEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
- registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true);
+ registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false);
registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup);
registry->RegisterDictionaryPref(prefs::kAppWindowPlacement);
diff --git a/chrome/browser/ui/navigation_correction_tab_observer.cc b/chrome/browser/ui/navigation_correction_tab_observer.cc
--- a/chrome/browser/ui/navigation_correction_tab_observer.cc
+++ b/chrome/browser/ui/navigation_correction_tab_observer.cc
@@ -59,7 +59,7 @@ void NavigationCorrectionTabObserver::SetAllowEnableCorrectionsForTesting(
void NavigationCorrectionTabObserver::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* prefs) {
prefs->RegisterBooleanPref(embedder_support::kAlternateErrorPagesEnabled,
- true,
+ false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
@@ -109,10 +109,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
registry->RegisterBooleanPref(prefs::kLocalDiscoveryEnabled, true);
registry->RegisterBooleanPref(
prefs::kLocalDiscoveryNotificationsEnabled,
-#if defined(OS_WIN)
false,
-#else
- true,
-#endif
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/cloud_print/connector_settings.cc
--- a/chrome/service/cloud_print/connector_settings.cc
+++ b/chrome/service/cloud_print/connector_settings.cc
@@ -60,7 +60,7 @@ void ConnectorSettings::InitFrom(ServiceProcessPrefs* prefs) {
DCHECK(server_url_.is_valid());
connect_new_printers_ = prefs->GetBoolean(
- prefs::kCloudPrintConnectNewPrinters, true);
+ prefs::kCloudPrintConnectNewPrinters, false);
xmpp_ping_enabled_ = prefs->GetBoolean(
prefs::kCloudPrintXmppPingEnabled, false);
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -882,10 +882,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
// suggestions available.
// TODO(mathp): Differentiate between number of suggestions available
// (current metric) and number shown to the user.
- if (!has_logged_address_suggestions_count_) {
- AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
- has_logged_address_suggestions_count_ = true;
- }
+ has_logged_address_suggestions_count_ = true;
}
}
@@ -1523,8 +1520,8 @@ void AutofillManager::Reset() {
#if defined(OS_ANDROID) || defined(OS_IOS)
autofill_assistant_.Reset();
#endif
- has_logged_autofill_enabled_ = false;
- has_logged_address_suggestions_count_ = false;
+ has_logged_autofill_enabled_ = true;
+ has_logged_address_suggestions_count_ = true;
did_show_suggestions_ = false;
user_did_type_ = false;
user_did_autofill_ = false;
diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
--- a/components/autofill/core/common/autofill_prefs.cc
+++ b/components/autofill/core/common/autofill_prefs.cc
@@ -147,7 +147,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(
- prefs::kAutofillCreditCardEnabled, true,
+ prefs::kAutofillCreditCardEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterStringPref(
prefs::kAutofillProfileValidity, "",
diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc
--- a/components/bookmarks/browser/bookmark_utils.cc
+++ b/components/bookmarks/browser/bookmark_utils.cc
@@ -439,12 +439,12 @@ bool DoesBookmarkContainWords(const base::string16& title,
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kShowBookmarkBar,
- false,
+ true,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true);
registry->RegisterBooleanPref(
prefs::kShowAppsShortcutInBookmarkBar,
- true,
+ false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(
prefs::kShowManagedBookmarksInBookmarkBar,
diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc
--- a/components/safe_browsing/core/common/safe_browsing_prefs.cc
+++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc
@@ -198,9 +198,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
- prefs::kSafeBrowsingExtendedReportingOptInAllowed, true);
+ prefs::kSafeBrowsingExtendedReportingOptInAllowed, false);
registry->RegisterBooleanPref(
- prefs::kSafeBrowsingEnabled, true,
+ prefs::kSafeBrowsingEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(prefs::kSafeBrowsingEnhanced, false);
registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled,
--
2.17.1