Chromium Code Reviews| Index: base/values.h |
| diff --git a/base/values.h b/base/values.h |
| index e19eca761fdeabadb474b69e02b0e183ad01d327..9df4c6eac94aa380538d2b5d9bdc604d0c9a25bd 100644 |
| --- a/base/values.h |
| +++ b/base/values.h |
| @@ -29,6 +29,7 @@ |
| #include "base/base_export.h" |
| #include "base/compiler_specific.h" |
| +#include "base/containers/flat_map.h" |
| #include "base/macros.h" |
| #include "base/memory/manual_constructor.h" |
| #include "base/strings/string16.h" |
| @@ -48,7 +49,7 @@ using BinaryValue = Value; |
| // See the file-level comment above for more information. |
| class BASE_EXPORT Value { |
| public: |
| - using DictStorage = std::map<std::string, std::unique_ptr<Value>>; |
| + using DictStorage = base::flat_map<std::string, std::unique_ptr<Value>>; |
| using ListStorage = std::vector<std::unique_ptr<Value>>; |
| enum class Type { |
| @@ -92,6 +93,8 @@ class BASE_EXPORT Value { |
| explicit Value(const string16& in_string); |
| explicit Value(StringPiece in_string); |
| + explicit Value(DictStorage&& in_dict) noexcept; |
|
jdoerrie
2017/04/10 11:44:57
nit: Consider moving this constructor down after t
|
| + |
| explicit Value(const std::vector<char>& in_blob); |
| explicit Value(std::vector<char>&& in_blob) noexcept; |