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

Side by Side Diff: extensions/common/api/declarative_net_request/rules_manifest_info.h

Issue 2881453002: DNR Prototype: With flatbuffers
Patch Set: -- Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
6 #define EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
7
8 #include "base/macros.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/common/manifest_handler.h"
11
12 namespace base {
13 class FilePath;
14 }
15
16 namespace extensions {
17 namespace declarative_net_request {
18
19 struct RulesManifestData : Extension::ManifestData {
20 explicit RulesManifestData(base::FilePath path);
21 ~RulesManifestData() override;
22 static const base::FilePath* GetJSONRulesetPath(const Extension* extension);
23
24 base::FilePath json_ruleset_path;
25 DISALLOW_COPY_AND_ASSIGN(RulesManifestData);
26 };
27
28 // Parses the kDeclarativeNetRequestRulesetLocation manifest key.
29 class RulesManifestHandler : public ManifestHandler {
30 public:
31 RulesManifestHandler();
32 ~RulesManifestHandler() override;
33
34 private:
35 bool Parse(Extension* extension, base::string16* error) override;
36 bool Validate(const Extension* extension,
37 std::string* error,
38 std::vector<InstallWarning>* warnings) const override;
39 const std::vector<std::string> Keys() const override;
40
41 DISALLOW_COPY_AND_ASSIGN(RulesManifestHandler);
42 };
43
44 } // namespace declarative_net_request
45 } // namespace extensions
46
47 #endif // EXTENSIONS_COMMON_API_DECLARATIVE_NET_REQUEST_RULES_MANIFEST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698