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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
226 #endif | 226 #endif |
227 | 227 |
228 namespace { | 228 namespace { |
229 | 229 |
230 #if defined(OS_WIN) | 230 #if defined(OS_WIN) |
231 // Deprecated 11/2015 (M48). TODO(gab): delete in M52+. | 231 // Deprecated 11/2015 (M48). TODO(gab): delete in M52+. |
232 const char kShownAutoLaunchInfobarDeprecated[] = | 232 const char kShownAutoLaunchInfobarDeprecated[] = |
233 "browser.shown_autolaunch_infobar"; | 233 "browser.shown_autolaunch_infobar"; |
234 #endif // defined(OS_WIN) | 234 #endif // defined(OS_WIN) |
235 | 235 |
236 // The SessionStartupPref used this pref to store the list of URLs to restore | 236 // Deprecated 12/2015. |
gab
2015/12/02 21:27:18
This comment change belongs on your other CL I thi
sdefresne
2015/12/03 10:28:33
Ack, removed.
| |
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 | |
239 // by "session.startup_urls_migration_time". Both are obsolete now (2015/09) and | |
240 // should be removed once a few releases have happened. | |
241 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup"; | 237 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup"; |
242 const char kRestoreStartupURLsMigrationTime[] = | 238 const char kRestoreStartupURLsMigrationTime[] = |
243 "session.startup_urls_migration_time"; | 239 "session.startup_urls_migration_time"; |
244 | 240 |
241 // Deprecated 12/2015. | |
242 const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated"; | |
243 | |
245 } // namespace | 244 } // namespace |
246 | 245 |
247 namespace chrome { | 246 namespace chrome { |
248 | 247 |
249 void RegisterLocalState(PrefRegistrySimple* registry) { | 248 void RegisterLocalState(PrefRegistrySimple* registry) { |
250 // Please keep this list alphabetized. | 249 // Please keep this list alphabetized. |
251 AppListService::RegisterPrefs(registry); | 250 AppListService::RegisterPrefs(registry); |
252 browser_shutdown::RegisterPrefs(registry); | 251 browser_shutdown::RegisterPrefs(registry); |
253 BrowserProcessImpl::RegisterPrefs(registry); | 252 BrowserProcessImpl::RegisterPrefs(registry); |
254 ChromeMetricsServiceClient::RegisterPrefs(registry); | 253 ChromeMetricsServiceClient::RegisterPrefs(registry); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 | 522 |
524 // Preferences registered only for migration (clearing or moving to a new key) | 523 // Preferences registered only for migration (clearing or moving to a new key) |
525 // go here. | 524 // go here. |
526 | 525 |
527 #if defined(OS_WIN) | 526 #if defined(OS_WIN) |
528 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); | 527 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); |
529 #endif // defined(OS_WIN) | 528 #endif // defined(OS_WIN) |
530 | 529 |
531 registry->RegisterListPref(kURLsToRestoreOnStartupOld); | 530 registry->RegisterListPref(kURLsToRestoreOnStartupOld); |
532 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); | 531 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); |
532 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false); | |
533 } | 533 } |
534 | 534 |
535 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 535 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
536 RegisterProfilePrefs(registry); | 536 RegisterProfilePrefs(registry); |
537 | 537 |
538 #if defined(OS_CHROMEOS) | 538 #if defined(OS_CHROMEOS) |
539 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); | 539 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); |
540 #endif | 540 #endif |
541 } | 541 } |
542 | 542 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 #endif | 574 #endif |
575 | 575 |
576 #if defined(OS_WIN) | 576 #if defined(OS_WIN) |
577 // Added 11/2015. | 577 // Added 11/2015. |
578 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); | 578 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); |
579 #endif | 579 #endif |
580 | 580 |
581 // Added 12/1015. | 581 // Added 12/1015. |
582 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); | 582 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); |
583 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); | 583 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); |
584 | |
585 // Added 12/2015. | |
586 profile_prefs->ClearPref(kRestoreOnStartupMigrated); | |
584 } | 587 } |
585 | 588 |
586 } // namespace chrome | 589 } // namespace chrome |
OLD | NEW |