| Index: chrome/browser/prefs/browser_prefs.cc
|
| diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
| index d4fd972a213407749a196207f008dc4a91168884..874224710ce1774f2171aaa79a4e3d4a478e027d 100644
|
| --- a/chrome/browser/prefs/browser_prefs.cc
|
| +++ b/chrome/browser/prefs/browser_prefs.cc
|
| @@ -72,6 +72,7 @@
|
| #include "components/dom_distiller/core/distilled_page_prefs.h"
|
| #include "components/flags_ui/pref_service_flags_storage.h"
|
| #include "components/gcm_driver/gcm_channel_status_syncer.h"
|
| +#include "components/metrics/metrics_service.h"
|
| #include "components/network_time/network_time_tracker.h"
|
| #include "components/ntp_snippets/ntp_snippets_service.h"
|
| #include "components/omnibox/browser/zero_suggest_provider.h"
|
| @@ -249,6 +250,9 @@ const char kRestoreStartupURLsMigrationTime[] =
|
| // Deprecated 12/2015.
|
| const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated";
|
|
|
| +// Deprecated 3/2016.
|
| +const char kCheckDefaultBrowser[] = "browser.check_default_browser";
|
| +
|
| #if defined(USE_AURA)
|
| // Deprecated 1/2016.
|
| const char kMaxSeparationForGestureTouchesInPixels[] =
|
| @@ -587,6 +591,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
| registry->RegisterListPref(kURLsToRestoreOnStartupOld);
|
| registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0);
|
| registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false);
|
| +
|
| + registry->RegisterBooleanPref(kCheckDefaultBrowser, true);
|
| }
|
|
|
| void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
| @@ -663,6 +669,20 @@ void MigrateObsoleteProfilePrefs(Profile* profile) {
|
| profile_prefs->ClearPref(kOverscrollHorizontalResistThreshold);
|
| profile_prefs->ClearPref(kOverscrollVerticalResistThreshold);
|
| #endif // defined(USE_AURA)
|
| +
|
| + // Added 3/2016.
|
| + if (!profile_prefs->GetBoolean(kCheckDefaultBrowser)) {
|
| + // Seed kDefaultBrowserLastDismissed with the install date.
|
| + metrics::MetricsService* metrics_service =
|
| + g_browser_process->metrics_service();
|
| + base::Time install_time =
|
| + metrics_service
|
| + ? base::Time::FromTimeT(metrics_service->GetInstallDate())
|
| + : base::Time::Now();
|
| + profile_prefs->SetInt64(prefs::kDefaultBrowserLastDismissed,
|
| + install_time.ToInternalValue());
|
| + }
|
| + profile_prefs->ClearPref(kCheckDefaultBrowser);
|
| }
|
|
|
| } // namespace chrome
|
|
|