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

Side by Side Diff: base/values.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 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 unified diff | Download patch
« no previous file with comments | « base/trace_event/trace_event_system_stats_monitor.cc ('k') | cc/debug/traced_picture.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/values.h" 5 #include "base/values.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 } 1161 }
1162 1162
1163 ValueSerializer::~ValueSerializer() { 1163 ValueSerializer::~ValueSerializer() {
1164 } 1164 }
1165 1165
1166 ValueDeserializer::~ValueDeserializer() { 1166 ValueDeserializer::~ValueDeserializer() {
1167 } 1167 }
1168 1168
1169 std::ostream& operator<<(std::ostream& out, const Value& value) { 1169 std::ostream& operator<<(std::ostream& out, const Value& value) {
1170 std::string json; 1170 std::string json;
1171 JSONWriter::WriteWithOptions(&value, 1171 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json);
1172 JSONWriter::OPTIONS_PRETTY_PRINT,
1173 &json);
1174 return out << json; 1172 return out << json;
1175 } 1173 }
1176 1174
1177 } // namespace base 1175 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_system_stats_monitor.cc ('k') | cc/debug/traced_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698