Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: chrome/browser/prefs/session_startup_pref.cc

Issue 12638005: Fix sync promo first run bugs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/session_startup_pref.cc
diff --git a/chrome/browser/prefs/session_startup_pref.cc b/chrome/browser/prefs/session_startup_pref.cc
index decc6228f382e0e11617f157f12af95942f75180..12697c171c046104577d7693dbed8d33799f63d6 100644
--- a/chrome/browser/prefs/session_startup_pref.cc
+++ b/chrome/browser/prefs/session_startup_pref.cc
@@ -186,8 +186,11 @@ void SessionStartupPref::MigrateMacDefaultPrefIfNecessary(PrefService* prefs) {
// The default startup pref used to be LAST, now it is DEFAULT. Don't change
// the setting for existing profiles (even if the user has never changed it),
// but make new profiles default to DEFAULT.
- bool old_profile_version = Version(prefs->GetString(
- prefs::kProfileCreatedByVersion)).IsOlderThan("21.0.1180.0");
+ bool old_profile_version =
+ !prefs->FindPreference(
+ prefs::kProfileCreatedByVersion)->IsDefaultValue() &&
+ Version(prefs->GetString(prefs::kProfileCreatedByVersion)).IsOlderThan(
+ "21.0.1180.0");
if (old_profile_version && TypeIsDefault(prefs))
prefs->SetInteger(prefs::kRestoreOnStartup, kPrefValueLast);
#endif
« no previous file with comments | « chrome/browser/first_run/first_run_internal.h ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698