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

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 1312693005: Remove migration of obsolete value for "session.restore_on_startup". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url-to-restore-on-startup
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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/browser_prefs.h" 5 #include "chrome/browser/prefs/browser_prefs.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // The SessionStartupPref used this pref to store the list of URLs to restore 236 // The SessionStartupPref used this pref to store the list of URLs to restore
237 // on startup, and then renamed it to "sessions.startup_urls" in M31. Migration 237 // on startup, and then renamed it to "sessions.startup_urls" in M31. Migration
238 // code was added and the timestamp of when the migration happened was tracked 238 // code was added and the timestamp of when the migration happened was tracked
239 // by "session.startup_urls_migration_time". Both are obsolete now (12/2015) and 239 // by "session.startup_urls_migration_time". Both are obsolete now (12/2015) and
240 // should be removed once a few releases have happened. 240 // should be removed once a few releases have happened.
241 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup"; 241 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup";
242 const char kRestoreStartupURLsMigrationTime[] = 242 const char kRestoreStartupURLsMigrationTime[] =
243 "session.startup_urls_migration_time"; 243 "session.startup_urls_migration_time";
244 244
245 // Deprecated 12/2015.
246 const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated";
247
245 } // namespace 248 } // namespace
246 249
247 namespace chrome { 250 namespace chrome {
248 251
249 void RegisterLocalState(PrefRegistrySimple* registry) { 252 void RegisterLocalState(PrefRegistrySimple* registry) {
250 // Please keep this list alphabetized. 253 // Please keep this list alphabetized.
251 AppListService::RegisterPrefs(registry); 254 AppListService::RegisterPrefs(registry);
252 browser_shutdown::RegisterPrefs(registry); 255 browser_shutdown::RegisterPrefs(registry);
253 BrowserProcessImpl::RegisterPrefs(registry); 256 BrowserProcessImpl::RegisterPrefs(registry);
254 ChromeMetricsServiceClient::RegisterPrefs(registry); 257 ChromeMetricsServiceClient::RegisterPrefs(registry);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 526
524 // Preferences registered only for migration (clearing or moving to a new key) 527 // Preferences registered only for migration (clearing or moving to a new key)
525 // go here. 528 // go here.
526 529
527 #if defined(OS_WIN) 530 #if defined(OS_WIN)
528 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); 531 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0);
529 #endif // defined(OS_WIN) 532 #endif // defined(OS_WIN)
530 533
531 registry->RegisterListPref(kURLsToRestoreOnStartupOld); 534 registry->RegisterListPref(kURLsToRestoreOnStartupOld);
532 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); 535 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0);
536 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false);
533 } 537 }
534 538
535 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 539 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
536 RegisterProfilePrefs(registry); 540 RegisterProfilePrefs(registry);
537 541
538 #if defined(OS_CHROMEOS) 542 #if defined(OS_CHROMEOS)
539 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); 543 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
540 #endif 544 #endif
541 } 545 }
542 546
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 #endif 578 #endif
575 579
576 #if defined(OS_WIN) 580 #if defined(OS_WIN)
577 // Added 11/2015. 581 // Added 11/2015.
578 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); 582 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated);
579 #endif 583 #endif
580 584
581 // Added 12/1015. 585 // Added 12/1015.
582 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); 586 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld);
583 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); 587 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime);
588
589 // Added 12/2015.
590 profile_prefs->ClearPref(kRestoreOnStartupMigrated);
584 } 591 }
585 592
586 } // namespace chrome 593 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698