OLD | NEW |
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> |
11 #include <ostream> | 11 #include <ostream> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 17 #include "base/move.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
19 | 20 |
20 namespace base { | 21 namespace base { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node); | 25 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node); |
25 | 26 |
26 // Make a deep copy of |node|, but don't include empty lists or dictionaries | 27 // Make a deep copy of |node|, but don't include empty lists or dictionaries |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 ValueDeserializer::~ValueDeserializer() { | 1161 ValueDeserializer::~ValueDeserializer() { |
1161 } | 1162 } |
1162 | 1163 |
1163 std::ostream& operator<<(std::ostream& out, const Value& value) { | 1164 std::ostream& operator<<(std::ostream& out, const Value& value) { |
1164 std::string json; | 1165 std::string json; |
1165 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json); | 1166 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json); |
1166 return out << json; | 1167 return out << json; |
1167 } | 1168 } |
1168 | 1169 |
1169 } // namespace base | 1170 } // namespace base |
OLD | NEW |