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

Side by Side Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.cc

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 8 years, 7 months 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 | Annotate | Revision Log
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 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_ registry.h" 5 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_ registry.h"
6 6
7 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_condit ion.h" 7 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_condit ion.h"
8 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 8 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
9 #include "net/url_request/url_request.h" 9 #include "net/url_request/url_request.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 WebRequestRulesRegistry::WebRequestRulesRegistry() {} 13 WebRequestRulesRegistry::WebRequestRulesRegistry() {}
14 14
15 WebRequestRulesRegistry::~WebRequestRulesRegistry() {}
16
17 std::set<WebRequestRule::GlobalRuleId> 15 std::set<WebRequestRule::GlobalRuleId>
18 WebRequestRulesRegistry::GetMatches(net::URLRequest* request, 16 WebRequestRulesRegistry::GetMatches(net::URLRequest* request,
19 RequestStages request_stage) { 17 RequestStages request_stage) {
20 std::set<WebRequestRule::GlobalRuleId> result; 18 std::set<WebRequestRule::GlobalRuleId> result;
21 19
22 // Figure out for which rules the URL match conditions were fulfilled. 20 // Figure out for which rules the URL match conditions were fulfilled.
23 typedef std::set<URLMatcherConditionSet::ID> URLMatches; 21 typedef std::set<URLMatcherConditionSet::ID> URLMatches;
24 URLMatches url_matches = url_matcher_.MatchURL(request->url()); 22 URLMatches url_matches = url_matcher_.MatchURL(request->url());
25 23
26 // Then we need to check for each of these, whether the other 24 // Then we need to check for each of these, whether the other
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 166
169 content::BrowserThread::ID WebRequestRulesRegistry::GetOwnerThread() const { 167 content::BrowserThread::ID WebRequestRulesRegistry::GetOwnerThread() const {
170 return content::BrowserThread::IO; 168 return content::BrowserThread::IO;
171 } 169 }
172 170
173 bool WebRequestRulesRegistry::IsEmpty() const { 171 bool WebRequestRulesRegistry::IsEmpty() const {
174 return rule_triggers_.empty() && webrequest_rules_.empty() && 172 return rule_triggers_.empty() && webrequest_rules_.empty() &&
175 url_matcher_.IsEmpty(); 173 url_matcher_.IsEmpty();
176 } 174 }
177 175
176 WebRequestRulesRegistry::~WebRequestRulesRegistry() {}
177
178 } // namespace extensions 178 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698