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

Unified Diff: components/syncable_prefs/pref_model_associator.cc

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . Created 4 years, 3 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
« no previous file with comments | « components/error_page/common/localized_error.cc ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/syncable_prefs/pref_model_associator.cc
diff --git a/components/syncable_prefs/pref_model_associator.cc b/components/syncable_prefs/pref_model_associator.cc
index aae6ab77d63b0225c5e4c18912a7c4089e5d4a1a..c43679f3921b21729779aed0a94e9703223efd6c 100644
--- a/components/syncable_prefs/pref_model_associator.cc
+++ b/components/syncable_prefs/pref_model_associator.cc
@@ -299,10 +299,8 @@ base::Value* PrefModelAssociator::MergeListValues(const base::Value& from_value,
static_cast<const base::ListValue&>(to_value);
base::ListValue* result = to_list_value.DeepCopy();
- for (base::ListValue::const_iterator i = from_list_value.begin();
- i != from_list_value.end(); ++i) {
- base::Value* value = (*i)->DeepCopy();
- result->AppendIfNotPresent(value);
+ for (const auto& value : from_list_value) {
+ result->AppendIfNotPresent(value->CreateDeepCopy());
}
return result;
}
« no previous file with comments | « components/error_page/common/localized_error.cc ('k') | components/user_manager/user_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698