diff options
author | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-26 01:11:44 +0000 |
---|---|---|
committer | battre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-26 01:11:44 +0000 |
commit | 5cf906f8476ea5d718bc676e622a04ec153e95f7 (patch) | |
tree | b37dca65e384cc7a5a86dffcf8fed12cf31c9025 /base/values.h | |
parent | 1c669f135def144fba217cb04e2e668144bf0177 (diff) | |
download | chromium_src-5cf906f8476ea5d718bc676e622a04ec153e95f7.zip chromium_src-5cf906f8476ea5d718bc676e622a04ec153e95f7.tar.gz chromium_src-5cf906f8476ea5d718bc676e622a04ec153e95f7.tar.bz2 |
Value::GetAsDictionary
BUG=none
TEST=no
Review URL: http://codereview.chromium.org/8701002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r-- | base/values.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/values.h b/base/values.h index aa26b3e..026fcf6 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; |