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

Unified Diff: extensions/common/permissions/permission_set.cc

Issue 377553003: Create a ManifestPermission implementation for Automation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Working, probably; untested Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/permissions/permission_set.cc
diff --git a/extensions/common/permissions/permission_set.cc b/extensions/common/permissions/permission_set.cc
index 4a8d158e91fe37329565fd9ce96e1c05e0e9dcea..ae45b8ecbc7c9e3f0c7f02d20c6de5e6554c4ac4 100644
--- a/extensions/common/permissions/permission_set.cc
+++ b/extensions/common/permissions/permission_set.cc
@@ -216,12 +216,8 @@ bool PermissionSet::HasEffectiveAccessToAllHosts() const {
// There are two ways this set can have effective access to all hosts:
// 1) it has an <all_urls> URL pattern.
// 2) it has a named permission with implied full URL access.
- for (URLPatternSet::const_iterator host = effective_hosts().begin();
- host != effective_hosts().end(); ++host) {
- if (host->match_all_urls() ||
- (host->match_subdomains() && host->host().empty()))
- return true;
- }
+ if (effective_hosts().MatchesAllURLs())
+ return true;
for (APIPermissionSet::const_iterator i = apis().begin();
i != apis().end(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698