OLD | NEW |
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 Loading... |
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 538 |
536 // Preferences registered only for migration (clearing or moving to a new key) | 539 // Preferences registered only for migration (clearing or moving to a new key) |
537 // go here. | 540 // go here. |
538 | 541 |
539 #if defined(OS_WIN) | 542 #if defined(OS_WIN) |
540 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); | 543 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); |
541 #endif // defined(OS_WIN) | 544 #endif // defined(OS_WIN) |
542 | 545 |
543 registry->RegisterListPref(kURLsToRestoreOnStartupOld); | 546 registry->RegisterListPref(kURLsToRestoreOnStartupOld); |
544 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); | 547 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); |
| 548 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false); |
545 } | 549 } |
546 | 550 |
547 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 551 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
548 RegisterProfilePrefs(registry); | 552 RegisterProfilePrefs(registry); |
549 | 553 |
550 #if defined(OS_CHROMEOS) | 554 #if defined(OS_CHROMEOS) |
551 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); | 555 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); |
552 #endif | 556 #endif |
553 } | 557 } |
554 | 558 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 #endif | 590 #endif |
587 | 591 |
588 #if defined(OS_WIN) | 592 #if defined(OS_WIN) |
589 // Added 11/2015. | 593 // Added 11/2015. |
590 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); | 594 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); |
591 #endif | 595 #endif |
592 | 596 |
593 // Added 12/1015. | 597 // Added 12/1015. |
594 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); | 598 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); |
595 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); | 599 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); |
| 600 |
| 601 // Added 12/2015. |
| 602 profile_prefs->ClearPref(kRestoreOnStartupMigrated); |
596 } | 603 } |
597 | 604 |
598 } // namespace chrome | 605 } // namespace chrome |
OLD | NEW |