summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-13 17:34:31 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-13 17:34:31 +0000
commit4fc3c56432cde7d5c938cb75bdfbabd75d9ec755 (patch)
treec75bebaa6ad73888b12e93a24c1880ece01dde96 /base/values.h
parent9978b8f0cbac1cd176a6ecac457eb9dacd3ad0f0 (diff)
downloadchromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.zip
chromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.tar.gz
chromium_src-4fc3c56432cde7d5c938cb75bdfbabd75d9ec755.tar.bz2
base: Fix the TODO in ListValue::Remove().
Change the return type of Remove() to bool, and add a size_t output parameter. BUG=None TEST=None R=evan@chromium.org Review URL: http://codereview.chromium.org/7618021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.h')
-rw-r--r--base/values.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/values.h b/base/values.h
index 3af36c0..a30791b 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);