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

Side by Side Diff: extensions/common/api/declarative_net_request/indexed_rule.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_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_
6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_
7
8 #include "base/macros.h"
9 #include "extensions/common/api/declarative_net_request/constants.h"
10
11 namespace extensions {
12 namespace declarative_net_request {
13 struct ParsedRule;
14
15 struct IndexedRule {
16 IndexedRule();
17 ~IndexedRule();
18
19 uint32_t id; // XX
20 uint32_t priority; // XX
21 uint8_t options = OptionFlag::OptionFlag_NONE; // XX
22 uint16_t element_types; // XX
23 uint8_t activation_types; // XX
24 UrlPatternType url_pattern_type =
25 UrlPatternType::UrlPatternType_SUBSTRING; // XX
26 AnchorType anchor_left = AnchorType::AnchorType_NONE; // XX
27 AnchorType anchor_right = AnchorType::AnchorType_NONE; // XX
28 std::vector<std::string> domains_included; // XX Kept sorted
29 std::vector<std::string> domains_excluded; // XX Kept sorted
30 std::string url_pattern; // XX
31 std::string redirect_url; // XX
32
33 DISALLOW_COPY_AND_ASSIGN(IndexedRule);
34 };
35
36 ParseResult CreateIndexedRule(std::unique_ptr<Rule> parsed_rule,
37 IndexedRule* indexed_rule);
38
39 } // namespace declarative_net_request
40
41 } // namespace extensions
42
43 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698