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

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: fix platform specific stuff 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
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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1157 }
1158 1158
1159 ValueSerializer::~ValueSerializer() { 1159 ValueSerializer::~ValueSerializer() {
1160 } 1160 }
1161 1161
1162 ValueDeserializer::~ValueDeserializer() { 1162 ValueDeserializer::~ValueDeserializer() {
1163 } 1163 }
1164 1164
1165 std::ostream& operator<<(std::ostream& out, const Value& value) { 1165 std::ostream& operator<<(std::ostream& out, const Value& value) {
1166 std::string json; 1166 std::string json;
1167 JSONWriter::WriteWithOptions(&value, 1167 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json);
1168 JSONWriter::OPTIONS_PRETTY_PRINT,
1169 &json);
1170 return out << json; 1168 return out << json;
1171 } 1169 }
1172 1170
1173 } // namespace base 1171 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698