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

Unified Diff: chrome/browser/prefs/chrome_pref_model_associator_client.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
Index: chrome/browser/prefs/chrome_pref_model_associator_client.cc
diff --git a/chrome/browser/prefs/chrome_pref_model_associator_client.cc b/chrome/browser/prefs/chrome_pref_model_associator_client.cc
index cb2c3fefd494564511fa18ef21c6f006e10012c5..6253199be9da8c371592d072ab908b6c9ee1b5ef 100644
--- a/chrome/browser/prefs/chrome_pref_model_associator_client.cc
+++ b/chrome/browser/prefs/chrome_pref_model_associator_client.cc
@@ -9,20 +9,6 @@
#include "components/content_settings/core/browser/website_settings_info.h"
#include "components/content_settings/core/browser/website_settings_registry.h"
-namespace {
-// List of migrated preference name pairs. If a preference is migrated
-// (meaning renamed) adding the old and new preference names here will ensure
-// that the sync engine knows how to deal with the synced values coming in
-// with the old name. Preference migration itself doesn't happen here. It may
-// happen in session_startup_pref.cc.
-const struct MigratedPreferences {
- const char* const old_name;
- const char* const new_name;
-} kMigratedPreferences[] = {
- {prefs::kURLsToRestoreOnStartupOld, prefs::kURLsToRestoreOnStartup},
-};
-} // namespace
-
// static
ChromePrefModelAssociatorClient*
ChromePrefModelAssociatorClient::GetInstance() {
@@ -48,27 +34,3 @@ bool ChromePrefModelAssociatorClient::IsMergeableDictionaryPreference(
}
return false;
}
-
-bool ChromePrefModelAssociatorClient::IsMigratedPreference(
- const std::string& new_pref_name,
- std::string* old_pref_name) const {
- for (size_t i = 0; i < arraysize(kMigratedPreferences); ++i) {
- if (new_pref_name == kMigratedPreferences[i].new_name) {
- old_pref_name->assign(kMigratedPreferences[i].old_name);
- return true;
- }
- }
- return false;
-}
-
-bool ChromePrefModelAssociatorClient::IsOldMigratedPreference(
- const std::string& old_pref_name,
- std::string* new_pref_name) const {
- for (size_t i = 0; i < arraysize(kMigratedPreferences); ++i) {
- if (old_pref_name == kMigratedPreferences[i].old_name) {
- new_pref_name->assign(kMigratedPreferences[i].new_name);
- return true;
- }
- }
- return false;
-}
« no previous file with comments | « chrome/browser/prefs/chrome_pref_model_associator_client.h ('k') | chrome/browser/prefs/session_startup_pref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698