Index: generated_files_will_not_submit/permissions_api.cc |
diff --git a/generated_files_will_not_submit/permissions_api.cc b/generated_files_will_not_submit/permissions_api.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff1a06b6e592531ee597c41bd4801ec3fc40133c |
--- /dev/null |
+++ b/generated_files_will_not_submit/permissions_api.cc |
@@ -0,0 +1,125 @@ |
+// 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 |
+// chrome/common/extensions/api/permissions.json |
+// DO NOT EDIT. |
+ |
+#include "tools/json_schema_compiler/util.h" |
+#include "chrome/common/extensions/api/permissions_api.h" |
+ |
+namespace extensions { |
+namespace permissions_api { |
+ |
+// |
+// Types |
+// |
+ |
+Permissions::Permissions() {} |
+Permissions::~Permissions() {} |
+ |
+// static |
+bool Permissions::Populate(const Value& value, Permissions* out) { |
+ if (!value.IsType(Value::TYPE_DICTIONARY)) |
+ return false; |
+ const DictionaryValue* dict = static_cast<const DictionaryValue*>(&value); |
+ |
+ if (!api_util::GetOptionalStrings(*dict, "origins", &out->origins)) |
+ return false; |
+ if (!api_util::GetOptionalStrings(*dict, "permissions", &out->permissions)) |
+ return false; |
+ return true; |
+} |
+ |
+Value* Permissions::ToValue() const { |
+ DictionaryValue* value = new DictionaryValue(); |
+ |
+ api_util::SetOptionalStrings(origins, "origins", value); |
+ api_util::SetOptionalStrings(permissions, "permissions", value); |
+ |
+ return value; |
+} |
+ |
+// |
+// Functions |
+// |
+ |
+Contains::Params::Params() {} |
+Contains::Params::~Params() {} |
+ |
+// static |
+bool Contains::Params::Populate(const ListValue& args, |
+ Contains::Params* out) { |
+ if (args.GetSize() != 1) |
+ return false; |
+ |
+ DictionaryValue* permissions_param = NULL; |
+ if (!args.GetDictionary(0, &permissions_param)) |
+ return false; |
+ if (!Permissions::Populate(*permissions_param, &out->permissions)) |
+ return false; |
+ |
+ return true; |
+} |
+ |
+// static |
+Value* Contains::Result::Create(const bool result) { |
+ return Value::CreateBooleanValue(result); |
+} |
+ |
+// static |
+Value* GetAll::Result::Create(const Permissions& permissions) { |
+ DictionaryValue* result = new DictionaryValue(); |
+ result->Set("permissions", permissions.ToValue()); |
+ return result; |
+} |
+ |
+Request::Params::Params() {} |
+Request::Params::~Params() {} |
+ |
+// static |
+bool Request::Params::Populate(const ListValue& args, |
+ Request::Params* out) { |
+ if (args.GetSize() != 1) |
+ return false; |
+ |
+ DictionaryValue* permissions_param = NULL; |
+ if (!args.GetDictionary(0, &permissions_param)) |
+ return false; |
+ if (!Permissions::Populate(*permissions_param, &out->permissions)) |
+ return false; |
+ |
+ return true; |
+} |
+ |
+// static |
+Value* Request::Result::Create(const bool granted) { |
+ return Value::CreateBooleanValue(granted); |
+} |
+ |
+Remove::Params::Params() {} |
+Remove::Params::~Params() {} |
+ |
+// static |
+bool Remove::Params::Populate(const ListValue& args, |
+ Remove::Params* out) { |
+ if (args.GetSize() != 1) |
+ return false; |
+ |
+ DictionaryValue* permissions_param = NULL; |
+ if (!args.GetDictionary(0, &permissions_param)) |
+ return false; |
+ if (!Permissions::Populate(*permissions_param, &out->permissions)) |
+ return false; |
+ |
+ return true; |
+} |
+ |
+// static |
+Value* Remove::Result::Create(const bool removed) { |
+ return Value::CreateBooleanValue(removed); |
+} |
+ |
+} // namespace extensions |
+} // namespace permissions_api |