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

Unified Diff: base/values.h

Issue 7618021: base: Fix the TODO in ListValue::Remove(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos 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
« 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 3af36c04d028c7fb754920dd12b7008c6c2222ba..a30791bc6357c671f56c02c0c39e61027c11aabb 100644
--- a/base/values.h
+++ b/base/values.h
@@ -402,8 +402,9 @@ class BASE_EXPORT ListValue : public Value {
bool Remove(size_t index, Value** out_value);
// Removes the first instance of |value| found in the list, if any, and
- // deletes it. Returns the index that it was located at (-1 for not present).
- int Remove(const Value& value);
+ // deletes it. |index| is the location where |value| was found. Returns false
+ // if not found.
+ bool Remove(const Value& value, size_t* index);
// Appends a Value to the end of the list.
void Append(Value* in_value);
« 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