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

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

Issue 2730533002: chrome.contentSettings API: Block patterns that match extension URLs for mic and video
Patch Set: Fix MatchesExtensionUrls Created 3 years, 9 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..36db8f72a9a41b274af36196836d6a6fd911ed12 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 any extension URL (i.e. the scheme is
+ // a wildcard or chrome-extension, and the hostname is a wildcard or looks
+ // like an extension ID).
+ bool MatchesExtensionUrls() 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