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

Unified Diff: base/json/json_writer.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 | « no previous file | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer.cc
diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
index 19bc0da972fc76eb9705682991ef571d8b09ee3e..0b658eed59d6bec7ea881acc4f385ba9c33b6c06 100644
--- a/base/json/json_writer.cc
+++ b/base/json/json_writer.cc
@@ -127,9 +127,7 @@ bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
bool first_value_has_been_output = false;
bool result = node.GetAsList(&list);
DCHECK(result);
- for (ListValue::const_iterator it = list->begin(); it != list->end();
- ++it) {
- const Value* value = *it;
+ for (const auto& value : *list) {
if (omit_binary_values_ && value->GetType() == Value::TYPE_BINARY)
continue;
« no previous file with comments | « no previous file | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698