| 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" | |
| 18 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 20 | 19 |
| 21 namespace base { | 20 namespace base { |
| 22 | 21 |
| 23 namespace { | 22 namespace { |
| 24 | 23 |
| 25 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node); | 24 std::unique_ptr<Value> CopyWithoutEmptyChildren(const Value& node); |
| 26 | 25 |
| 27 // Make a deep copy of |node|, but don't include empty lists or dictionaries | 26 // 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... |
| 1161 ValueDeserializer::~ValueDeserializer() { | 1160 ValueDeserializer::~ValueDeserializer() { |
| 1162 } | 1161 } |
| 1163 | 1162 |
| 1164 std::ostream& operator<<(std::ostream& out, const Value& value) { | 1163 std::ostream& operator<<(std::ostream& out, const Value& value) { |
| 1165 std::string json; | 1164 std::string json; |
| 1166 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json); | 1165 JSONWriter::WriteWithOptions(value, JSONWriter::OPTIONS_PRETTY_PRINT, &json); |
| 1167 return out << json; | 1166 return out << json; |
| 1168 } | 1167 } |
| 1169 | 1168 |
| 1170 } // namespace base | 1169 } // namespace base |
| OLD | NEW |