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

Unified Diff: chrome/browser/prefs/pref_model_associator.h

Issue 24930003: Migrate startup URLs pref. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add rather than update previously unseen migrated prefs. Created 7 years, 2 months 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/pref_model_associator.h
diff --git a/chrome/browser/prefs/pref_model_associator.h b/chrome/browser/prefs/pref_model_associator.h
index 539d38a301c9b71d15547053c8c8093cd5268cd0..7e6c8713f77fe4c29eb80ee73a174aced65b3c36 100644
--- a/chrome/browser/prefs/pref_model_associator.h
+++ b/chrome/browser/prefs/pref_model_associator.h
@@ -111,19 +111,23 @@ class PrefModelAssociator
protected:
friend class ProfileSyncServicePreferenceTest;
- typedef std::map<std::string, syncer::SyncData> SyncDataMap;
+ typedef std::vector<std::pair<std::string, syncer::SyncData> >
Nicolas Zea 2013/10/10 17:44:14 why switch to a vector? I think a map is still cor
robertshield 2013/10/10 20:06:21 Ok, I hadn't understood that MergeDataAndStartSync
Nicolas Zea 2013/10/10 20:35:09 Well, it's not that MergeDataAndStartSyncing will
robertshield 2013/10/11 18:29:31 Done.
+ SyncDataPrefList;
// Create an association for a given preference. If |sync_pref| is valid,
// signifying that sync has data for this preference, we reconcile their data
// with ours and append a new UPDATE SyncChange to |sync_changes|. If
// sync_pref is not set, we append an ADD SyncChange to |sync_changes| with
// the current preference data.
+ // |migrated_preference_list| points to a vector that may be updated with a
+ // string containing the old name of the preference described by |pref_name|.
// Note: We do not modify the sync data for preferences that are either
// controlled by policy (are not user modifiable) or have their default value
// (are not user controlled).
void InitPrefAndAssociate(const syncer::SyncData& sync_pref,
const std::string& pref_name,
- syncer::SyncChangeList* sync_changes);
+ syncer::SyncChangeList* sync_changes,
+ SyncDataPrefList* migrated_preference_list);
static base::Value* MergeListValues(
const base::Value& from_value, const base::Value& to_value);
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_model_associator.cc » ('j') | chrome/browser/prefs/pref_model_associator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698