summaryrefslogtreecommitdiffstats
path: root/base/values.h
diff options
context:
space:
mode:
authormarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 13:56:38 +0000
committermarkusheintz@chromium.org <markusheintz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 13:56:38 +0000
commite36eaacd4f118c6c6f9e093c787a151dcccf82dc (patch)
tree9627f1ede329c9c1e163e163a889ebb5e4e4dd6a /base/values.h
parentf0e88d3f4d2b2e022f35c9d47b164124054443ed (diff)
downloadchromium_src-e36eaacd4f118c6c6f9e093c787a151dcccf82dc.zip
chromium_src-e36eaacd4f118c6c6f9e093c787a151dcccf82dc.tar.gz
chromium_src-e36eaacd4f118c6c6f9e093c787a151dcccf82dc.tar.bz2
Let the method ListValue::AppendIfNotPresent always take ownership of the |in_value|. In any cases. What is passed in get's owned.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6695019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78686 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 8dc9f25..b341517 100644
--- a/base/values.h
+++ b/base/values.h
@@ -398,8 +398,9 @@ class ListValue : public Value {
// Appends a Value to the end of the list.
void Append(Value* in_value);
- // Appends a Value if it's not already present.
- // Returns true if successful, or false if the value was already present.
+ // Appends a Value if it's not already present. Takes ownership of the
+ // |in_value|. Returns true if successful, or false if the value was already
+ // present. If the value was already present the |in_value| is deleted.
bool AppendIfNotPresent(Value* in_value);
// Insert a Value at index.