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

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

Issue 1302303002: Remove year+ old migration support of "session.urls_to_restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_unittest
Patch Set: Address comments Created 5 years 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
« no previous file with comments | « no previous file | chrome/browser/prefs/chrome_pref_model_associator_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/browser_prefs.cc
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 3e5e7a2d2cdee77e8fc38329f87449587dfcd14e..ee136d2b1e606bc518e261d6bf98394761d5b77d 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -233,6 +233,15 @@ const char kShownAutoLaunchInfobarDeprecated[] =
"browser.shown_autolaunch_infobar";
#endif // defined(OS_WIN)
+// The SessionStartupPref used this pref to store the list of URLs to restore
+// on startup, and then renamed it to "sessions.startup_urls" in M31. Migration
+// code was added and the timestamp of when the migration happened was tracked
+// by "session.startup_urls_migration_time". Both are obsolete now (12/2015) and
+// should be removed once a few releases have happened.
+const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup";
+const char kRestoreStartupURLsMigrationTime[] =
+ "session.startup_urls_migration_time";
+
} // namespace
namespace chrome {
@@ -518,6 +527,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
#if defined(OS_WIN)
registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0);
#endif // defined(OS_WIN)
+
+ registry->RegisterListPref(kURLsToRestoreOnStartupOld);
+ registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0);
}
void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -565,6 +577,10 @@ void MigrateObsoleteProfilePrefs(Profile* profile) {
// Added 11/2015.
profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated);
#endif
+
+ // Added 12/1015.
+ profile_prefs->ClearPref(kURLsToRestoreOnStartupOld);
+ profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime);
}
} // namespace chrome
« no previous file with comments | « no previous file | chrome/browser/prefs/chrome_pref_model_associator_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698