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

Unified Diff: base/values.cc

Issue 2807953002: Use base::flat_map for base::Value dictionary storage. (Closed)
Patch Set: Swap 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
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index d492a474631c841442d72851ebff94ff3d163241..0d807125d5db089a8d54376ee584d26f042b67de 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -159,6 +159,10 @@ Value::Value(const string16& in_string) : type_(Type::STRING) {
Value::Value(StringPiece in_string) : Value(in_string.as_string()) {}
+Value::Value(DictStorage&& in_dict) noexcept : type_(Type::DICTIONARY) {
jdoerrie 2017/04/10 11:44:57 Same here.
+ dict_ptr_.Init(MakeUnique<DictStorage>(std::move(in_dict)));
+}
+
Value::Value(const std::vector<char>& in_blob) : type_(Type::BINARY) {
binary_value_.Init(in_blob);
}

Powered by Google App Engine
This is Rietveld 408576698