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

Unified Diff: base/values.h

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: David's comments Created 8 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
« no previous file with comments | « base/json/json_writer.cc ('k') | 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 223e0f88134aeae9a32c96d095fc7ffbb568eed8..c5834070352156dca888de3529778a673c879a1f 100644
--- a/base/values.h
+++ b/base/values.h
@@ -414,7 +414,8 @@ class BASE_EXPORT ListValue : public Value {
// Gets the Value at the given index. Modifies |out_value| (and returns true)
// only if the index falls within the current list range.
// Note that the list always owns the Value passed out via |out_value|.
- bool Get(size_t index, Value** out_value) const;
+ bool Get(size_t index, const Value** out_value) const;
+ bool Get(size_t index, Value** out_value);
// Convenience forms of Get(). Modifies |out_value| (and returns true)
// only if the index is valid and the Value at that index can be returned
@@ -424,9 +425,12 @@ class BASE_EXPORT ListValue : public Value {
bool GetDouble(size_t index, double* out_value) const;
bool GetString(size_t index, std::string* out_value) const;
bool GetString(size_t index, string16* out_value) const;
- bool GetBinary(size_t index, BinaryValue** out_value) const;
- bool GetDictionary(size_t index, DictionaryValue** out_value) const;
- bool GetList(size_t index, ListValue** out_value) const;
+ bool GetBinary(size_t index, const BinaryValue** out_value) const;
+ bool GetBinary(size_t index, BinaryValue** out_value);
+ bool GetDictionary(size_t index, const DictionaryValue** out_value) const;
+ bool GetDictionary(size_t index, DictionaryValue** out_value);
+ bool GetList(size_t index, const ListValue** out_value) const;
+ bool GetList(size_t index, ListValue** out_value);
// Removes the Value with the specified index from this list.
// If |out_value| is non-NULL, the removed Value AND ITS OWNERSHIP will be
« no previous file with comments | « base/json/json_writer.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698