1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/extensions/extension_function_util.h"
9 bool ReadOneOrMoreIntegers(base::Value* value, std::vector<int>* result) {
10 if (value->IsType(Value::TYPE_INTEGER)) {
12 if (!value->GetAsInteger(&v))
17 } else if (value->IsType(Value::TYPE_LIST)) {
18 base::ListValue* values = static_cast<base::ListValue*>(value);
19 for (size_t i = 0; i < values->GetSize(); ++i) {
21 if (!values->GetInteger(i, &v))
30 } // namespace extensions