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

Side by Side Diff: extensions/browser/extension_function_util.cc

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/extension_function_util.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #include <stddef.h>
6
7 #include "extensions/browser/extension_function_util.h"
8
9 namespace extensions {
10
11 bool ReadOneOrMoreIntegers(base::Value* value, std::vector<int>* result) {
12 if (value->IsType(base::Value::TYPE_INTEGER)) {
13 int v = -1;
14 if (!value->GetAsInteger(&v))
15 return false;
16 result->push_back(v);
17 return true;
18
19 } else if (value->IsType(base::Value::TYPE_LIST)) {
20 base::ListValue* values = static_cast<base::ListValue*>(value);
21 for (size_t i = 0; i < values->GetSize(); ++i) {
22 int v = -1;
23 if (!values->GetInteger(i, &v))
24 return false;
25 result->push_back(v);
26 }
27 return true;
28 }
29 return false;
30 }
31
32 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_function_util.h ('k') | extensions/extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698