Chromium Code Reviews| Index: base/values.cc |
| diff --git a/base/values.cc b/base/values.cc |
| index 60b0d70f1ed07f7a92c1f6ca7f5815dae3c38fa6..d7b102112831c98e569a2f3f1d02692ab428d523 100644 |
| --- a/base/values.cc |
| +++ b/base/values.cc |
| @@ -887,6 +887,15 @@ ListValue::const_iterator ListValue::Find(const Value& value) const { |
| return std::find_if(list_.begin(), list_.end(), ValueEquals(&value)); |
| } |
| +int ListValue::Find(const Value& value) const { |
|
pastarmovj
2011/10/05 09:47:16
This is not part of the CL but a rebase artefact.
|
| + for (ValueVector::const_iterator i(list_.begin()); i != list_.end(); ++i) { |
| + if ((*i)->Equals(&value)) { |
| + return i - list_.begin(); |
| + } |
| + } |
| + return -1; |
| +} |
| + |
| bool ListValue::GetAsList(ListValue** out_value) { |
| if (out_value) |
| *out_value = this; |