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

Side by Side Diff: extensions/browser/api/declarative_webrequest/webrequest_rules_registry.h

Issue 764643002: Remove WebViewKey in rules registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // "http://www.example.com/query/" has any matches, and the URLMatcher 73 // "http://www.example.com/query/" has any matches, and the URLMatcher
74 // will respond with the URLMatcherConditionSet::ID. We can map this 74 // will respond with the URLMatcherConditionSet::ID. We can map this
75 // to the WebRequestRule and check whether also the other conditions (in this 75 // to the WebRequestRule and check whether also the other conditions (in this
76 // example 'scheme': 'http') are fulfilled. 76 // example 'scheme': 'http') are fulfilled.
77 class WebRequestRulesRegistry : public RulesRegistry { 77 class WebRequestRulesRegistry : public RulesRegistry {
78 public: 78 public:
79 // |cache_delegate| can be NULL. In that case it constructs the registry with 79 // |cache_delegate| can be NULL. In that case it constructs the registry with
80 // storage functionality suspended. 80 // storage functionality suspended.
81 WebRequestRulesRegistry(content::BrowserContext* browser_context, 81 WebRequestRulesRegistry(content::BrowserContext* browser_context,
82 RulesCacheDelegate* cache_delegate, 82 RulesCacheDelegate* cache_delegate,
83 const WebViewKey& webview_key); 83 int rule_registry_id);
Fady Samuel 2014/11/26 23:39:41 rules_registry_id
Xi Han 2014/11/27 23:25:25 Done.
84 84
85 // TODO(battre): This will become an implementation detail, because we need 85 // TODO(battre): This will become an implementation detail, because we need
86 // a way to also execute the actions of the rules. 86 // a way to also execute the actions of the rules.
87 std::set<const WebRequestRule*> GetMatches( 87 std::set<const WebRequestRule*> GetMatches(
88 const WebRequestData& request_data_without_ids) const; 88 const WebRequestData& request_data_without_ids) const;
89 89
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,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 content::BrowserContext* browser_context_; 188 content::BrowserContext* browser_context_;
189 scoped_refptr<InfoMap> extension_info_map_; 189 scoped_refptr<InfoMap> extension_info_map_;
190 190
191 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry); 191 DISALLOW_COPY_AND_ASSIGN(WebRequestRulesRegistry);
192 }; 192 };
193 193
194 } // namespace extensions 194 } // namespace extensions
195 195
196 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST RY_H_ 196 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_WEBREQUEST_WEBREQUEST_RULES_REGIST RY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698