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

Unified Diff: chromeos/network/onc/onc_mapper.cc

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 7 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 | « chromeos/network/network_util.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_mapper.cc
diff --git a/chromeos/network/onc/onc_mapper.cc b/chromeos/network/onc/onc_mapper.cc
index d5df15ef23c4a9465fa590be0c77f4260e306d2e..b24fdd6173d9639cb8093754e5bd268cb9eb9173 100644
--- a/chromeos/network/onc/onc_mapper.cc
+++ b/chromeos/network/onc/onc_mapper.cc
@@ -116,10 +116,7 @@ std::unique_ptr<base::ListValue> Mapper::MapArray(
std::unique_ptr<base::ListValue> result_array(new base::ListValue);
int original_index = 0;
- for (base::ListValue::const_iterator it = onc_array.begin();
- it != onc_array.end(); ++it, ++original_index) {
- const base::Value* entry = *it;
-
+ for (const auto& entry : onc_array) {
std::unique_ptr<base::Value> result_entry;
result_entry = MapEntry(original_index,
*array_signature.onc_array_entry_signature,
@@ -129,6 +126,7 @@ std::unique_ptr<base::ListValue> Mapper::MapArray(
result_array->Append(result_entry.release());
else
DCHECK(*nested_error);
+ ++original_index;
}
return result_array;
}
« no previous file with comments | « chromeos/network/network_util.cc ('k') | chromeos/network/onc/onc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698