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

Unified Diff: generated_files_will_not_submit/crossref.cc

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: generated_files_will_not_submit/crossref.cc
diff --git a/generated_files_will_not_submit/crossref.cc b/generated_files_will_not_submit/crossref.cc
new file mode 100644
index 0000000000000000000000000000000000000000..807ac381e100bde0cb15513cf2af2451c3dbbb2f
--- /dev/null
+++ b/generated_files_will_not_submit/crossref.cc
@@ -0,0 +1,64 @@
+// 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.
+
+// GENERATED FROM THE API DEFINITION IN
+// tools/json_schema_compiler/test/crossref.json
+// DO NOT EDIT.
+
+#include "tools/json_schema_compiler/util.h"
+#include "tools/json_schema_compiler/test/crossref.h"
+#include "tools/json_schema_compiler/test/simple_api.h"
+
+
+using base::Value;
+using base::DictionaryValue;
+using base::ListValue;
+
+namespace test {
+namespace api {
+namespace crossref {
+
+//
+// Functions
+//
+
+Value* GetTestType::Result::Create(const simple_api::TestType& result) {
+ return result.ToValue().release();
+}
+
+TestTypeOptionalParam::Params::Params() {}
+TestTypeOptionalParam::Params::~Params() {}
+
+// static
+scoped_ptr<TestTypeOptionalParam::Params> TestTypeOptionalParam::Params::Create(const ListValue& args) {
+ if (args.GetSize() > 1)
+ return scoped_ptr<Params>();
+ scoped_ptr<Params> params(new Params());
+
+ Value* test_type_value = NULL;
+ if (!args.Get(0, &test_type_value) || test_type_value->IsType(Value::TYPE_NULL))
+ return params.Pass();
+ {
+ if (!test_type_value->IsType(Value::TYPE_DICTIONARY))
+ return scoped_ptr<Params>();
+ DictionaryValue* dictionary = NULL;
+ if (!test_type_value->GetAsDictionary(&dictionary))
+ return scoped_ptr<Params>();
+ scoped_ptr<simple_api::TestType> temp(new simple_api::TestType());
+ if (!simple_api::TestType::Populate(*dictionary, temp.get()))
+ return scoped_ptr<Params>();
+ params->test_type = temp.Pass();
+ }
+
+ return params.Pass();
+}
+
+
+Value* TestTypeOptionalParam::Result::Create() {
+ return Value::CreateNullValue();
+}
+
+} // crossref
+} // api
+} // test
« no previous file with comments | « generated_files_will_not_submit/crossref.h ('k') | generated_files_will_not_submit/experimental.declarative.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698