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

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

Issue 15239002: Move Extension and PermissionsData to extensions/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_condit ion.h" 13 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_condit ion.h"
14 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h" 14 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta nts.h"
15 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h" 15 #include "chrome/browser/extensions/api/web_request/web_request_api_helpers.h"
16 #include "chrome/browser/extensions/api/web_request/web_request_permissions.h" 16 #include "chrome/browser/extensions/api/web_request/web_request_permissions.h"
17 #include "chrome/browser/extensions/extension_system.h" 17 #include "chrome/browser/extensions/extension_system.h"
18 #include "chrome/common/extensions/extension.h"
19 #include "chrome/common/extensions/permissions/permissions_data.h"
20 #include "extensions/common/error_utils.h" 18 #include "extensions/common/error_utils.h"
19 #include "extensions/common/extension.h"
20 #include "extensions/common/permissions/permissions_data.h"
21 #include "net/url_request/url_request.h" 21 #include "net/url_request/url_request.h"
22 22
23 namespace { 23 namespace {
24 24
25 const char kActionCannotBeExecuted[] = "The action '*' can never be executed " 25 const char kActionCannotBeExecuted[] = "The action '*' can never be executed "
26 "because there are is no time in the request life-cycle during which the " 26 "because there are is no time in the request life-cycle during which the "
27 "conditions can be checked and the action can possibly be executed."; 27 "conditions can be checked and the action can possibly be executed.";
28 28
29 const char kAllURLsPermissionNeeded[] = 29 const char kAllURLsPermissionNeeded[] =
30 "To execute the action '*', you need to request host permission for all " 30 "To execute the action '*', you need to request host permission for all "
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 RuleTriggers::const_iterator rule_trigger = rule_triggers_.find(*url_match); 401 RuleTriggers::const_iterator rule_trigger = rule_triggers_.find(*url_match);
402 CHECK(rule_trigger != rule_triggers_.end()); 402 CHECK(rule_trigger != rule_triggers_.end());
403 if (!ContainsKey(*result, rule_trigger->second) && 403 if (!ContainsKey(*result, rule_trigger->second) &&
404 rule_trigger->second->conditions().IsFulfilled(*url_match, 404 rule_trigger->second->conditions().IsFulfilled(*url_match,
405 request_data)) 405 request_data))
406 result->insert(rule_trigger->second); 406 result->insert(rule_trigger->second);
407 } 407 }
408 } 408 }
409 409
410 } // namespace extensions 410 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698