| 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 |
| 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 (12/2015) and |
| 240 // should be removed once a few releases have happened. |
| 241 const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup"; |
| 242 const char kRestoreStartupURLsMigrationTime[] = |
| 243 "session.startup_urls_migration_time"; |
| 244 |
| 236 } // namespace | 245 } // namespace |
| 237 | 246 |
| 238 namespace chrome { | 247 namespace chrome { |
| 239 | 248 |
| 240 void RegisterLocalState(PrefRegistrySimple* registry) { | 249 void RegisterLocalState(PrefRegistrySimple* registry) { |
| 241 // Please keep this list alphabetized. | 250 // Please keep this list alphabetized. |
| 242 AppListService::RegisterPrefs(registry); | 251 AppListService::RegisterPrefs(registry); |
| 243 browser_shutdown::RegisterPrefs(registry); | 252 browser_shutdown::RegisterPrefs(registry); |
| 244 BrowserProcessImpl::RegisterPrefs(registry); | 253 BrowserProcessImpl::RegisterPrefs(registry); |
| 245 ChromeMetricsServiceClient::RegisterPrefs(registry); | 254 ChromeMetricsServiceClient::RegisterPrefs(registry); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 520 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 512 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry); | 521 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry); |
| 513 #endif | 522 #endif |
| 514 | 523 |
| 515 // Preferences registered only for migration (clearing or moving to a new key) | 524 // Preferences registered only for migration (clearing or moving to a new key) |
| 516 // go here. | 525 // go here. |
| 517 | 526 |
| 518 #if defined(OS_WIN) | 527 #if defined(OS_WIN) |
| 519 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); | 528 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0); |
| 520 #endif // defined(OS_WIN) | 529 #endif // defined(OS_WIN) |
| 530 |
| 531 registry->RegisterListPref(kURLsToRestoreOnStartupOld); |
| 532 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0); |
| 521 } | 533 } |
| 522 | 534 |
| 523 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 535 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 524 RegisterProfilePrefs(registry); | 536 RegisterProfilePrefs(registry); |
| 525 | 537 |
| 526 #if defined(OS_CHROMEOS) | 538 #if defined(OS_CHROMEOS) |
| 527 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); | 539 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); |
| 528 #endif | 540 #endif |
| 529 } | 541 } |
| 530 | 542 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 558 | 570 |
| 559 #if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST) | 571 #if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST) |
| 560 // Added 02/2015. | 572 // Added 02/2015. |
| 561 MigrateGoogleNowPrefs(profile); | 573 MigrateGoogleNowPrefs(profile); |
| 562 #endif | 574 #endif |
| 563 | 575 |
| 564 #if defined(OS_WIN) | 576 #if defined(OS_WIN) |
| 565 // Added 11/2015. | 577 // Added 11/2015. |
| 566 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); | 578 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); |
| 567 #endif | 579 #endif |
| 580 |
| 581 // Added 12/1015. |
| 582 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); |
| 583 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); |
| 568 } | 584 } |
| 569 | 585 |
| 570 } // namespace chrome | 586 } // namespace chrome |
| OLD | NEW |