OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | |
6 #define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 #include <vector> | |
11 | |
12 #include "base/memory/scoped_ptr.h" | |
13 | |
14 namespace base { | |
15 class DictionaryValue; | |
16 } | |
17 | |
18 namespace json_schema_compiler { | |
19 namespace util { | |
20 | |
21 // Pushes string of |from|.|name| and into |out|. Returns false if there is no | |
not at google - send to devlin
2012/01/17 05:42:32
"Adds string of |from|.|name| to |out|. Returns fa
| |
22 // list at the specified key or if the list has anything other than strings. | |
23 bool GetStrings( | |
24 const base::DictionaryValue& from, | |
25 const std::string& name, | |
26 std::vector<std::string>* out); | |
27 | |
28 // Pushes string of |from|.|name| and into |out|. Returns true on success or | |
not at google - send to devlin
2012/01/17 05:42:32
ditto
| |
29 // if there is nothing at the specified key. Returns false if anything other | |
30 // than a list of strings is at the specified key. | |
31 bool GetOptionalStrings( | |
32 const base::DictionaryValue& from, | |
33 const std::string& name, | |
34 scoped_ptr<std::vector<std::string> >* out); | |
35 | |
36 // Puts the vector of strings in |from| into a new ListValue at |out|.|name|. | |
not at google - send to devlin
2012/01/17 05:42:32
"Puts each string in |from|" ...
| |
37 void SetStrings( | |
38 const std::vector<std::string>& from, | |
39 const std::string& name, | |
40 base::DictionaryValue* out); | |
41 | |
42 // If from is non-NULL, puts each string in |from| into the |out|.|name|. | |
not at google - send to devlin
2012/01/17 05:42:32
"If |from| is non-NULL, puts each string $commentF
| |
43 void SetOptionalStrings( | |
44 const scoped_ptr<std::vector<std::string> >& from, | |
45 const std::string& name, | |
46 base::DictionaryValue* out); | |
47 | |
48 } // namespace api_util | |
49 } // namespace extensions | |
50 | |
51 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | |
OLD | NEW |