| Index: extensions/common/api/declarative_net_request/rules_manifest_info.h
|
| diff --git a/extensions/common/api/declarative_net_request/rules_manifest_info.h b/extensions/common/api/declarative_net_request/rules_manifest_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a49fe7272ddd3f061a65ef49f5f354bce11a05ef
|
| --- /dev/null
|
| +++ b/extensions/common/api/declarative_net_request/rules_manifest_info.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2017 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 EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
|
| +#define EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "extensions/common/extension.h"
|
| +#include "extensions/common/manifest_handler.h"
|
| +
|
| +namespace base {
|
| +class FilePath;
|
| +}
|
| +
|
| +namespace extensions {
|
| +namespace declarative_net_request {
|
| +
|
| +struct RulesManifestData : Extension::ManifestData {
|
| + explicit RulesManifestData(base::FilePath path);
|
| + ~RulesManifestData() override;
|
| + static const base::FilePath* GetJSONRulesetPath(const Extension* extension);
|
| +
|
| + base::FilePath json_ruleset_path;
|
| + DISALLOW_COPY_AND_ASSIGN(RulesManifestData);
|
| +};
|
| +
|
| +// Parses the kDeclarativeNetRequestRulesetLocation manifest key.
|
| +class RulesManifestHandler : public ManifestHandler {
|
| + public:
|
| + RulesManifestHandler();
|
| + ~RulesManifestHandler() override;
|
| +
|
| + private:
|
| + bool Parse(Extension* extension, base::string16* error) override;
|
| + bool Validate(const Extension* extension,
|
| + std::string* error,
|
| + std::vector<InstallWarning>* warnings) const override;
|
| + const std::vector<std::string> Keys() const override;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RulesManifestHandler);
|
| +};
|
| +
|
| +} // namespace declarative_net_request
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
|
|
|