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 <set> | 10 #include <set> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Returns which modifications should be executed on the network request | 90 // Returns which modifications should be executed on the network request |
91 // according to the rules registered in this registry. | 91 // according to the rules registered in this registry. |
92 std::list<LinkedPtrEventResponseDelta> CreateDeltas( | 92 std::list<LinkedPtrEventResponseDelta> CreateDeltas( |
93 const InfoMap* extension_info_map, | 93 const InfoMap* extension_info_map, |
94 const WebRequestData& request_data, | 94 const WebRequestData& request_data, |
95 bool crosses_incognito); | 95 bool crosses_incognito); |
96 | 96 |
97 // Implementation of RulesRegistry: | 97 // Implementation of RulesRegistry: |
98 virtual std::string AddRulesImpl( | 98 virtual std::string AddRulesImpl( |
99 const std::string& extension_id, | 99 const std::string& extension_id, |
100 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) OVERRIDE; | 100 const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) override; |
101 virtual std::string RemoveRulesImpl( | 101 virtual std::string RemoveRulesImpl( |
102 const std::string& extension_id, | 102 const std::string& extension_id, |
103 const std::vector<std::string>& rule_identifiers) OVERRIDE; | 103 const std::vector<std::string>& rule_identifiers) override; |
104 virtual std::string RemoveAllRulesImpl( | 104 virtual std::string RemoveAllRulesImpl( |
105 const std::string& extension_id) OVERRIDE; | 105 const std::string& extension_id) override; |
106 | 106 |
107 // Returns true if this object retains no allocated data. Only for debugging. | 107 // Returns true if this object retains no allocated data. Only for debugging. |
108 bool IsEmpty() const; | 108 bool IsEmpty() const; |
109 | 109 |
110 protected: | 110 protected: |
111 virtual ~WebRequestRulesRegistry(); | 111 virtual ~WebRequestRulesRegistry(); |
112 | 112 |
113 // Virtual for testing: | 113 // Virtual for testing: |
114 virtual base::Time GetExtensionInstallationTime( | 114 virtual base::Time GetExtensionInstallationTime( |
115 const std::string& extension_id) const; | 115 const std::string& extension_id) const; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 content::BrowserContext* browser_context_; | 189 content::BrowserContext* browser_context_; |
190 scoped_refptr<InfoMap> extension_info_map_; | 190 scoped_refptr<InfoMap> extension_info_map_; |
191 | 191 |
192 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry); | 192 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry); |
193 }; | 193 }; |
194 | 194 |
195 } // namespace extensions | 195 } // namespace extensions |
196 | 196 |
197 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST
RY_H_ | 197 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST
RY_H_ |
OLD | NEW |