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

Unified Diff: chrome/common/pref_names.cc

Issue 10049005: Fix homepage migration for users who never changed their settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Value -> base::Value Created 8 years, 8 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/common/pref_names.cc
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 21ebc8779a782f6ff742db26caed86966caed697..9865ab1436ec4a0ac86eec0c173a5a523603fa18 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -43,18 +43,25 @@ const char kIsGooglePlusUser[] = "is_google_plus_user";
const char kSessionExitedCleanly[] = "profile.exited_cleanly";
// An integer pref. Holds one of several values:
-// 0: (or empty) don't do anything special on startup.
+// 0: (deprecated) open the homepage on startup
// 1: restore the last session.
// 2: this was used to indicate a specific session should be restored. It is
// no longer used, but saved to avoid conflict with old preferences.
// 3: unused, previously indicated the user wants to restore a saved session.
// 4: restore the URLs defined in kURLsToRestoreOnStartup.
+// 5: open the New Tab Page on startup (this is the default value).
const char kRestoreOnStartup[] = "session.restore_on_startup";
// The URLs to restore on startup or when the home button is pressed. The URLs
// are only restored on startup if kRestoreOnStartup is 4.
const char kURLsToRestoreOnStartup[] = "session.urls_to_restore_on_startup";
+// A preference to keep track of whether we have already checked whether we
+// need to migrate the user from kRestoreOnStartup=0 to kRestoreOnStartup=4.
+// We only need to do this check once, on upgrade from m18 or lower to m19 or
+// higher.
+const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated";
+
// The application locale.
// For OS_CHROMEOS we maintain kApplicationLocale property in both local state
// and user's profile. Global property determines locale of login screen,

Powered by Google App Engine
This is Rietveld 408576698