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

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: Revert changes to automation_apitest.cc 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 6109519d8fba262c976fd8eb3c5f9dc9d18b7c00..ee21137fcdcba4e481e5ad0a8a9364552ed7d084 100644
--- a/extensions/common/permissions/permission_set.cc
+++ b/extensions/common/permissions/permission_set.cc
@@ -214,12 +214,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