From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 12 Oct 2017 08:09:24 +0200
Subject: Modify default preferences
Do not hide component extensions
---
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 +-
.../browser/ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
chrome/service/cloud_print/connector_settings.cc | 2 +-
components/autofill/core/browser/autofill_manager.cc | 14 ++++----------
components/autofill/core/common/autofill_prefs.cc | 2 +-
components/bookmarks/browser/bookmark_utils.cc | 4 ++--
components/safe_browsing/common/safe_browsing_prefs.cc | 4 ++--
extensions/common/extension.cc | 8 --------
15 files changed, 19 insertions(+), 37 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
@@ -301,7 +301,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
@@ -1149,7 +1149,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
@@ -140,7 +140,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
@@ -50,7 +50,7 @@
-
+
$i18nRaw{resetPageFeedback}
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
@@ -66,11 +66,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
@@ -42,7 +42,7 @@ NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {}
// static
void NavigationCorrectionTabObserver::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* prefs) {
- prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true,
+ prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, 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
@@ -107,10 +107,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
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
@@ -516,10 +516,7 @@ bool AutofillManager::ShouldParseForms(const std::vector& forms,
bool enabled = IsAutofillEnabled();
sync_state_ = personal_data_ ? personal_data_->GetSyncSigninState()
: AutofillSyncSigninState::kNumSyncStates;
- if (!has_logged_autofill_enabled_) {
- AutofillMetrics::LogIsAutofillEnabledAtPageLoad(enabled, sync_state_);
- has_logged_autofill_enabled_ = true;
- }
+ has_logged_autofill_enabled_ = true;
return enabled;
}
@@ -803,10 +800,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;
}
}
@@ -1427,8 +1421,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
@@ -150,7 +150,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
@@ -443,12 +443,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/common/safe_browsing_prefs.cc b/components/safe_browsing/common/safe_browsing_prefs.cc
--- a/components/safe_browsing/common/safe_browsing_prefs.cc
+++ b/components/safe_browsing/common/safe_browsing_prefs.cc
@@ -167,9 +167,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::kSafeBrowsingProceedAnywayDisabled,
false);
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -365,14 +365,6 @@ bool Extension::ShouldDisplayInExtensionSettings() const {
if (is_theme())
return false;
- // Hide component extensions because they are only extensions as an
- // implementation detail of Chrome.
- if (extensions::Manifest::IsComponentLocation(location()) &&
- !base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kShowComponentExtensionOptions)) {
- return false;
- }
-
// Unless they are unpacked, never show hosted apps. Note: We intentionally
// show packaged apps and platform apps because there are some pieces of
// functionality that are only available in chrome://extensions/ but which
--
2.11.0