Index: tools/json_schema_compiler/util.h |
diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..360a967723cbfafeeead20a55eefe7f070e2e194 |
--- /dev/null |
+++ b/tools/json_schema_compiler/util.h |
@@ -0,0 +1,51 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_GEN_UTIL_H__ |
not at google - send to devlin
2012/01/12 06:01:05
this has the wrong #ifndef guard, but the presubmi
calamity
2012/01/12 22:59:20
Done. It wasn't in the presubmit checks? Maybe bec
|
+#define CHROME_BROWSER_EXTENSIONS_GEN_UTIL_H__ |
+#pragma once |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "base/memory/scoped_ptr.h" |
+ |
+namespace base { |
+class DictionaryValue; |
+} |
+ |
+namespace extensions { |
+namespace api_util { |
not at google - send to devlin
2012/01/12 06:01:05
yeah,
s/extensions/json_schema_compiler/
s/api_ut
calamity
2012/01/12 22:59:20
Done.
|
+ |
+bool GetStrings( |
not at google - send to devlin
2012/01/12 06:01:05
these all need documentation, since the behaviour
calamity
2012/01/16 04:01:06
Done.
|
+ const base::DictionaryValue& from, |
+ const std::string& name, |
+ std::vector<std::string>* out); |
+ |
+bool GetOptionalStrings( |
+ const base::DictionaryValue& from, |
+ const std::string& name, |
+ scoped_ptr<std::vector<std::string> >* out); |
+ |
+void SetStrings( |
+ const std::vector<std::string>& from, |
+ const std::string& name, |
+ base::DictionaryValue* out); |
+ |
+void SetOptionalStrings( |
+ const scoped_ptr<std::vector<std::string> >& from, |
+ const std::string& name, |
+ base::DictionaryValue* out); |
+ |
+template<class T> |
+bool GetTypes( |
+ const base::DictionaryValue& from, |
+ const std::string& name, |
+ std::vector<T>* out); |
+ |
+ |
+} // namespace api_util |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_GEN_UTIL_H__ |