From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 12 Oct 2017 08:09:24 +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/signin/signin_promo.cc                      |  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          |  6 +++---
 components/bookmarks/browser/bookmark_utils.cc             |  4 ++--
 components/safe_browsing/common/safe_browsing_prefs.cc     |  4 ++--
 extensions/common/extension.cc                             |  8 --------
 16 files changed, 22 insertions(+), 40 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
@@ -352,7 +352,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
@@ -1122,7 +1122,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
@@ -32,7 +32,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
@@ -23,7 +23,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
@@ -139,7 +139,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
@@ -52,7 +52,7 @@
         </paper-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/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -172,7 +172,7 @@ bool IsAutoCloseEnabledInEmbeddedURL(const GURL& url) {
 
 void RegisterProfilePrefs(
     user_prefs::PrefRegistrySyncable* registry) {
-  registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, true);
+  registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, false);
   registry->RegisterBooleanPref(prefs::kSignInPromoShowNTPBubble, false);
   registry->RegisterIntegerPref(prefs::kDiceSigninUserMenuPromoCount, 0);
 }
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
@@ -68,11 +68,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
@@ -57,7 +57,7 @@ NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {
 void NavigationCorrectionTabObserver::RegisterProfilePrefs(
     user_prefs::PrefRegistrySyncable* prefs) {
   prefs->RegisterBooleanPref(prefs::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
@@ -127,10 +127,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
@@ -359,10 +359,7 @@ bool AutofillManager::ShouldParseForms(const std::vector<FormData>& 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;
 }
@@ -625,10 +622,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;
     }
   }
 
@@ -1234,8 +1228,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
@@ -137,10 +137,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
       prefs::kAutofillBillingCustomerNumber, 0.0,
       user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
   registry->RegisterBooleanPref(
-      prefs::kAutofillEnabledDeprecated, true,
+      prefs::kAutofillEnabledDeprecated, false,
       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
   registry->RegisterBooleanPref(
-      prefs::kAutofillProfileEnabled, true,
+      prefs::kAutofillProfileEnabled, false,
       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
   registry->RegisterIntegerPref(
       prefs::kAutofillLastVersionDeduped, 0,
@@ -153,7 +153,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
@@ -440,12 +440,12 @@ void GetBookmarksMatchingProperties(BookmarkModel* model,
 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
@@ -149,9 +149,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
@@ -367,14 +367,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

