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

Unified Diff: components/content_settings/core/common/content_settings_pattern.h

Issue 2728503003: Update permission warning for contentSettings API
Patch Set: chrome.contentSettings API: Do not allow wildcard patterns that match extension URLs Created 3 years, 10 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: components/content_settings/core/common/content_settings_pattern.h
diff --git a/components/content_settings/core/common/content_settings_pattern.h b/components/content_settings/core/common/content_settings_pattern.h
index 7d6fc8d00dd04d3e700a806eccc368907dd6f21e..669dd5948e2178a9a2161293befe7976de535807 100644
--- a/components/content_settings/core/common/content_settings_pattern.h
+++ b/components/content_settings/core/common/content_settings_pattern.h
@@ -190,6 +190,11 @@ class ContentSettingsPattern {
// True if |url| matches this pattern.
bool Matches(const GURL& url) const;
+ // True if the pattern matches multiple extension URLs (i.e. the scheme is
+ // a wildcard and the hostname is either a wildcard or looks like an extension
+ // ID).
+ bool IsExtensionUrlWildcard() const;
+
// True if this pattern matches all hosts (i.e. it has a host wildcard).
bool MatchesAllHosts() const;
« no previous file with comments | « components/content_settings/core/common/DEPS ('k') | components/content_settings/core/common/content_settings_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698