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

Unified Diff: base/values.h

Issue 7714004: base: Add AsList() function to Value API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE Created 9 years, 4 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.h
diff --git a/base/values.h b/base/values.h
index a30791bc6357c671f56c02c0c39e61027c11aabb..2f41215e6b06b4bd62b60ed89797ceaf3e3e0c65 100644
--- a/base/values.h
+++ b/base/values.h
@@ -87,6 +87,8 @@ class BASE_EXPORT Value {
// Returns true if the current object represents a given type.
bool IsType(Type type) const { return type == type_; }
+ virtual ListValue* AsList();
+
// These methods allow the convenient retrieval of settings.
// If the current setting object can be converted into the given type,
// the value is returned through the |out_value| parameter and true is
@@ -431,6 +433,7 @@ class BASE_EXPORT ListValue : public Value {
const_iterator end() const { return list_.end(); }
// Overridden from Value:
+ virtual ListValue* AsList() OVERRIDE;
virtual bool GetAsList(ListValue** out_value) OVERRIDE;
virtual bool GetAsList(const ListValue** out_value) const OVERRIDE;
virtual ListValue* DeepCopy() const OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698