| 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..7805d9e5d5f02c6a9bf328c08e39848dd19bad66
|
| --- /dev/null
|
| +++ b/generated_files_will_not_submit/permissions_api.cc
|
| @@ -0,0 +1,126 @@
|
| +// 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 (!json_schema_compiler::util::GetOptionalStrings(*dict, "origins", &out->origins))
|
| + return false;
|
| + if (!json_schema_compiler::util::GetOptionalStrings(*dict, "permissions", &out->permissions))
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| +DictionaryValue* Permissions::ToValue() const {
|
| + DictionaryValue* value = new DictionaryValue();
|
| +
|
| + json_schema_compiler::util::SetOptionalStrings(origins, "origins", value);
|
| + json_schema_compiler::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->SetWithoutPathExpansion("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
|
|
|