| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGISTRY_
H_ | 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGISTRY_
H_ |
| 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGISTRY_
H_ | 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGISTRY_
H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/linked_ptr.h" | 17 #include "base/memory/linked_ptr.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "components/url_matcher/url_matcher.h" | 20 #include "components/url_matcher/url_matcher.h" |
| 21 #include "extensions/browser/api/declarative/declarative_rule.h" | 21 #include "extensions/browser/api/declarative/declarative_rule.h" |
| 22 #include "extensions/browser/api/declarative/rules_registry.h" | 22 #include "extensions/browser/api/declarative/rules_registry.h" |
| 23 #include "extensions/browser/api/declarative_webrequest/request_stage.h" | 23 #include "extensions/browser/api/declarative_webrequest/request_stage.h" |
| 24 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h" | 24 #include "extensions/browser/api/declarative_webrequest/webrequest_action.h" |
| 25 #include "extensions/browser/api/declarative_webrequest/webrequest_condition.h" | 25 #include "extensions/browser/api/declarative_webrequest/webrequest_condition.h" |
| 26 #include "extensions/browser/info_map.h" | 26 #include "extensions/browser/info_map.h" |
| 27 #include "extensions/common/extension_id.h" |
| 27 | 28 |
| 28 class WebRequestPermissions; | 29 class WebRequestPermissions; |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 class BrowserContext; | 32 class BrowserContext; |
| 32 } | 33 } |
| 33 | 34 |
| 34 namespace extension_web_request_api_helpers { | 35 namespace extension_web_request_api_helpers { |
| 35 struct EventResponseDelta; | 36 struct EventResponseDelta; |
| 36 } | 37 } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 176 |
| 176 // Map that tells us which WebRequestRule may match under the condition that | 177 // Map that tells us which WebRequestRule may match under the condition that |
| 177 // the URLMatcherConditionSet::ID was returned by the |url_matcher_|. | 178 // the URLMatcherConditionSet::ID was returned by the |url_matcher_|. |
| 178 RuleTriggers rule_triggers_; | 179 RuleTriggers rule_triggers_; |
| 179 | 180 |
| 180 // These rules contain condition sets with conditions without URL attributes. | 181 // These rules contain condition sets with conditions without URL attributes. |
| 181 // Such conditions are not triggered by URL matcher, so we need to test them | 182 // Such conditions are not triggered by URL matcher, so we need to test them |
| 182 // separately. | 183 // separately. |
| 183 std::set<const WebRequestRule*> rules_with_untriggered_conditions_; | 184 std::set<const WebRequestRule*> rules_with_untriggered_conditions_; |
| 184 | 185 |
| 185 std::map<WebRequestRule::ExtensionId, RulesMap> webrequest_rules_; | 186 std::map<ExtensionId, RulesMap> webrequest_rules_; |
| 186 | 187 |
| 187 url_matcher::URLMatcher url_matcher_; | 188 url_matcher::URLMatcher url_matcher_; |
| 188 | 189 |
| 189 content::BrowserContext* browser_context_; | 190 content::BrowserContext* browser_context_; |
| 190 scoped_refptr<InfoMap> extension_info_map_; | 191 scoped_refptr<InfoMap> extension_info_map_; |
| 191 | 192 |
| 192 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry); | 193 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry); |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 } // namespace extensions | 196 } // namespace extensions |
| 196 | 197 |
| 197 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST
RY_H_ | 198 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST
RY_H_ |
| OLD | NEW |