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

Unified Diff: dbus/values_util.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: Fix various builds. 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
Index: dbus/values_util.cc
diff --git a/dbus/values_util.cc b/dbus/values_util.cc
index ed435a193680ff368b2f3e757d062de5676e12ec..88b7f02ccb9d7ac576908263a0ccd0b485d9fa27 100644
--- a/dbus/values_util.cc
+++ b/dbus/values_util.cc
@@ -279,9 +279,7 @@ void AppendValueData(MessageWriter* writer, const base::Value& value) {
value.GetAsList(&list);
dbus::MessageWriter array_writer(NULL);
writer->OpenArray("v", &array_writer);
- for (base::ListValue::const_iterator iter = list->begin();
- iter != list->end(); ++iter) {
- const base::Value* value = *iter;
+ for (const auto& value : *list) {
AppendValueDataAsVariant(&array_writer, *value);
}
writer->CloseContainer(&array_writer);

Powered by Google App Engine
This is Rietveld 408576698