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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager.cc

Issue 2714853002: Remove kDistroDict from Preferences. (Closed)
Patch Set: kRlzPingDelay -> kRlzPingDelaySeconds Created 3 years, 10 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/profile_pref_store_manager.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager.cc b/chrome/browser/prefs/profile_pref_store_manager.cc
index 98f85db941adbc593d951c97aaad3117be85cc6a..c62708d8f333e116669d7555134f42ec5f19e2cd 100644
--- a/chrome/browser/prefs/profile_pref_store_manager.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager.cc
@@ -170,23 +170,18 @@ PersistentPrefStore* ProfilePrefStoreManager::CreateProfilePrefStore(
}
bool ProfilePrefStoreManager::InitializePrefsFromMasterPrefs(
- const base::DictionaryValue& master_prefs) {
+ std::unique_ptr<base::DictionaryValue> master_prefs) {
// Create the profile directory if it doesn't exist yet (very possible on
// first run).
if (!base::CreateDirectory(profile_path_))
return false;
- const base::DictionaryValue* to_serialize = &master_prefs;
- std::unique_ptr<base::DictionaryValue> copy;
-
if (kPlatformSupportsPreferenceTracking) {
- copy.reset(master_prefs.DeepCopy());
- to_serialize = copy.get();
PrefHashFilter(GetPrefHashStore(false),
GetExternalVerificationPrefHashStorePair(),
tracking_configuration_, base::Closure(), NULL,
reporting_ids_count_, false)
- .Initialize(copy.get());
+ .Initialize(master_prefs.get());
}
// This will write out to a single combined file which will be immediately
@@ -199,7 +194,7 @@ bool ProfilePrefStoreManager::InitializePrefsFromMasterPrefs(
// complete before Chrome can start (as master preferences seed the Local
// State and Preferences files). This won't trip ThreadIORestrictions as they
// won't have kicked in yet on the main thread.
- bool success = serializer.Serialize(*to_serialize);
+ bool success = serializer.Serialize(*master_prefs);
UMA_HISTOGRAM_BOOLEAN("Settings.InitializedFromMasterPrefs", success);
return success;
« no previous file with comments | « chrome/browser/prefs/profile_pref_store_manager.h ('k') | chrome/browser/prefs/profile_pref_store_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698