summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
authorvabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 22:27:11 +0000
committervabr@chromium.org <vabr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 22:27:11 +0000
commita61890ebc4d1d6f558edfe8a03ba6a6c72a16689 (patch)
treedc8768892744a98ba9386583a1d27fa575e72a15 /base/values.h
parentb39a8db3e8e31029e98075863a38f8c3b188529c (diff)
downloadchromium_src-a61890ebc4d1d6f558edfe8a03ba6a6c72a16689.zip
chromium_src-a61890ebc4d1d6f558edfe8a03ba6a6c72a16689.tar.gz
chromium_src-a61890ebc4d1d6f558edfe8a03ba6a6c72a16689.tar.bz2
Correct const accessors in base/values.(h|cc)
For problem description and other info please see the BUG page. This is for DictionaryValue. BUG=138946 TEST=N/A (no fix & no new feature) TBR=jar scottbyer achuith agl mnissler davemoore garykac akalin hans bulach phajdan.jr jamesr Review URL: https://chromiumcodereview.appspot.com/10834004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r--base/values.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/base/values.h b/base/values.h
index f9a459e..223e0f8 100644
--- a/base/values.h
+++ b/base/values.h
@@ -263,7 +263,8 @@ class BASE_EXPORT DictionaryValue : public Value {
// through the |out_value| parameter, and the function will return true.
// Otherwise, it will return false and |out_value| will be untouched.
// Note that the dictionary always owns the value that's returned.
- bool Get(const std::string& path, Value** out_value) const;
+ bool Get(const std::string& path, const Value** out_value) const;
+ bool Get(const std::string& path, Value** out_value);
// These are convenience forms of Get(). The value will be retrieved
// and the return value will be true if the path is valid and the value at
@@ -274,27 +275,36 @@ class BASE_EXPORT DictionaryValue : public Value {
bool GetString(const std::string& path, std::string* out_value) const;
bool GetString(const std::string& path, string16* out_value) const;
bool GetStringASCII(const std::string& path, std::string* out_value) const;
- bool GetBinary(const std::string& path, BinaryValue** out_value) const;
+ bool GetBinary(const std::string& path, const BinaryValue** out_value) const;
+ bool GetBinary(const std::string& path, BinaryValue** out_value);
bool GetDictionary(const std::string& path,
- DictionaryValue** out_value) const;
- bool GetList(const std::string& path, ListValue** out_value) const;
+ const DictionaryValue** out_value) const;
+ bool GetDictionary(const std::string& path, DictionaryValue** out_value);
+ bool GetList(const std::string& path, const ListValue** out_value) const;
+ bool GetList(const std::string& path, ListValue** out_value);
// Like Get(), but without special treatment of '.'. This allows e.g. URLs to
// be used as paths.
bool GetWithoutPathExpansion(const std::string& key,
- Value** out_value) const;
+ const Value** out_value) const;
+ bool GetWithoutPathExpansion(const std::string& key, Value** out_value);
bool GetIntegerWithoutPathExpansion(const std::string& key,
int* out_value) const;
bool GetDoubleWithoutPathExpansion(const std::string& key,
- double* out_value) const;
+ double* out_value) const;
bool GetStringWithoutPathExpansion(const std::string& key,
std::string* out_value) const;
bool GetStringWithoutPathExpansion(const std::string& key,
string16* out_value) const;
+ bool GetDictionaryWithoutPathExpansion(
+ const std::string& key,
+ const DictionaryValue** out_value) const;
bool GetDictionaryWithoutPathExpansion(const std::string& key,
- DictionaryValue** out_value) const;
+ DictionaryValue** out_value);
bool GetListWithoutPathExpansion(const std::string& key,
- ListValue** out_value) const;
+ const ListValue** out_value) const;
+ bool GetListWithoutPathExpansion(const std::string& key,
+ ListValue** out_value);
// Removes the Value with the specified path from this dictionary (or one
// of its child dictionaries, if the path is more than just a local key).