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 CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_RE
GISTRY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_RE
GISTRY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_RE
GISTRY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_RE
GISTRY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual std::string AddRulesImpl( | 62 virtual std::string AddRulesImpl( |
63 const std::string& extension_id, | 63 const std::string& extension_id, |
64 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) OVERRIDE; | 64 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) OVERRIDE; |
65 virtual std::string RemoveRulesImpl( | 65 virtual std::string RemoveRulesImpl( |
66 const std::string& extension_id, | 66 const std::string& extension_id, |
67 const std::vector<std::string>& rule_identifiers) OVERRIDE; | 67 const std::vector<std::string>& rule_identifiers) OVERRIDE; |
68 virtual std::string RemoveAllRulesImpl( | 68 virtual std::string RemoveAllRulesImpl( |
69 const std::string& extension_id) OVERRIDE; | 69 const std::string& extension_id) OVERRIDE; |
70 virtual content::BrowserThread::ID GetOwnerThread() const OVERRIDE; | 70 virtual content::BrowserThread::ID GetOwnerThread() const OVERRIDE; |
71 | 71 |
| 72 // Returns true if this object retains no allocated data. Only for debugging. |
| 73 bool IsEmpty() const; |
| 74 |
72 private: | 75 private: |
73 // Map that tells us which WebRequestRule may match under the condition that | 76 // Map that tells us which WebRequestRule may match under the condition that |
74 // the URLMatcherConditionSet::ID was returned by the |url_matcher_|. | 77 // the URLMatcherConditionSet::ID was returned by the |url_matcher_|. |
75 typedef std::map<URLMatcherConditionSet::ID, WebRequestRule*> RuleTriggers; | 78 typedef std::map<URLMatcherConditionSet::ID, WebRequestRule*> RuleTriggers; |
76 RuleTriggers rule_triggers_; | 79 RuleTriggers rule_triggers_; |
77 | 80 |
78 typedef std::map<WebRequestRule::GlobalRuleId, linked_ptr<WebRequestRule> > | 81 typedef std::map<WebRequestRule::GlobalRuleId, linked_ptr<WebRequestRule> > |
79 RulesMap; | 82 RulesMap; |
80 RulesMap webrequest_rules_; | 83 RulesMap webrequest_rules_; |
81 | 84 |
82 URLMatcher url_matcher_; | 85 URLMatcher url_matcher_; |
83 }; | 86 }; |
84 | 87 |
85 } // namespace extensions | 88 } // namespace extensions |
86 | 89 |
87 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES
_REGISTRY_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES
_REGISTRY_H_ |
OLD | NEW |