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

Unified Diff: base/values.h

Issue 8701002: Value::GetAsDictionary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pacify clang Created 9 years, 1 month 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 aa26b3e72648b3b89617ad1d0d7de2e16d30c524..026fcf664b0510c884f08c4368b0aa52c2b229ef 100644
--- a/base/values.h
+++ b/base/values.h
@@ -98,6 +98,8 @@ class BASE_EXPORT Value {
virtual bool GetAsString(string16* out_value) const;
virtual bool GetAsList(ListValue** out_value);
virtual bool GetAsList(const ListValue** out_value) const;
+ virtual bool GetAsDictionary(DictionaryValue** out_value);
+ virtual bool GetAsDictionary(const DictionaryValue** out_value) const;
// This creates a deep copy of the entire Value tree, and returns a pointer
// to the copy. The caller gets ownership of the copy, of course.
@@ -215,6 +217,11 @@ class BASE_EXPORT DictionaryValue : public Value {
DictionaryValue();
virtual ~DictionaryValue();
+ // Overridden from Value:
+ virtual bool GetAsDictionary(DictionaryValue** out_value) OVERRIDE;
+ virtual bool GetAsDictionary(
+ const DictionaryValue** out_value) const OVERRIDE;
+
// Returns true if the current dictionary has a value for the given key.
bool HasKey(const std::string& key) const;
« 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