Index: extensions/common/api/declarative_net_request/indexed_rule.h |
diff --git a/extensions/common/api/declarative_net_request/indexed_rule.h b/extensions/common/api/declarative_net_request/indexed_rule.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fc2c11da239754414c82b734f251c723e4ebdfb0 |
--- /dev/null |
+++ b/extensions/common/api/declarative_net_request/indexed_rule.h |
@@ -0,0 +1,43 @@ |
+// 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_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_ |
+#define EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_ |
+ |
+#include "base/macros.h" |
+#include "extensions/common/api/declarative_net_request/constants.h" |
+ |
+namespace extensions { |
+namespace declarative_net_request { |
+struct ParsedRule; |
+ |
+struct IndexedRule { |
+ IndexedRule(); |
+ ~IndexedRule(); |
+ |
+ uint32_t id; // XX |
+ uint32_t priority; // XX |
+ uint8_t options = OptionFlag::OptionFlag_NONE; // XX |
+ uint16_t element_types; // XX |
+ uint8_t activation_types; // XX |
+ UrlPatternType url_pattern_type = |
+ UrlPatternType::UrlPatternType_SUBSTRING; // XX |
+ AnchorType anchor_left = AnchorType::AnchorType_NONE; // XX |
+ AnchorType anchor_right = AnchorType::AnchorType_NONE; // XX |
+ std::vector<std::string> domains_included; // XX Kept sorted |
+ std::vector<std::string> domains_excluded; // XX Kept sorted |
+ std::string url_pattern; // XX |
+ std::string redirect_url; // XX |
+ |
+ DISALLOW_COPY_AND_ASSIGN(IndexedRule); |
+}; |
+ |
+ParseResult CreateIndexedRule(std::unique_ptr<Rule> parsed_rule, |
+ IndexedRule* indexed_rule); |
+ |
+} // namespace declarative_net_request |
+ |
+} // namespace extensions |
+ |
+#endif // EXTENSIONS_BROWSER_API_DECLARATIVE_NET_REQUEST_INDEXED_RULE_H_ |