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) { |