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

Unified Diff: base/values.cc

Issue 2811053002: Reland of Use base::flat_map for base::Value dictionary storage. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index d492a474631c841442d72851ebff94ff3d163241..23d2b384639c6dbd7e7bb27e75bf67330a573b82 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -165,6 +165,10 @@
Value::Value(std::vector<char>&& in_blob) noexcept : type_(Type::BINARY) {
binary_value_.Init(std::move(in_blob));
+}
+
+Value::Value(DictStorage&& in_dict) noexcept : type_(Type::DICTIONARY) {
+ dict_ptr_.Init(MakeUnique<DictStorage>(std::move(in_dict)));
}
Value& Value::operator=(const Value& that) {
« no previous file with comments | « base/values.h ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698