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

Unified Diff: base/values.h

Issue 2834153002: Introduce Value::GetList and Value(ListStorage) (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 | « no previous file | base/values.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.h
diff --git a/base/values.h b/base/values.h
index 075bc9fbb8fed7cd14095f1de4daa8a3ab9c13ea..8d342a98b1fe96a111e16b468708e67d34bd3b2e 100644
--- a/base/values.h
+++ b/base/values.h
@@ -97,6 +97,9 @@ class BASE_EXPORT Value {
explicit Value(DictStorage&& in_dict) noexcept;
+ explicit Value(const ListStorage& in_list);
+ explicit Value(ListStorage&& in_list) noexcept;
+
Value& operator=(const Value& that);
Value& operator=(Value&& that) noexcept;
@@ -130,6 +133,9 @@ class BASE_EXPORT Value {
const std::string& GetString() const;
const std::vector<char>& GetBlob() const;
+ ListStorage& GetList();
+ const ListStorage& GetList() const;
+
size_t GetSize() const; // DEPRECATED, use GetBlob().size() instead.
const char* GetBuffer() const; // DEPRECATED, use GetBlob().data() instead.
« no previous file with comments | « no previous file | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698