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

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

Issue 2226643002: Add metrics for schemes of content setting exceptions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 4 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 b5b83529b00f92b431157744a22fa4e9abebb3bb..8db1eca18d00f3c78ff8543d79cdf7a407e19234 100644
--- a/components/content_settings/core/common/content_settings_pattern.h
+++ b/components/content_settings/core/common/content_settings_pattern.h
@@ -53,6 +53,16 @@ class ContentSettingsPattern {
DISJOINT_ORDER_PRE = 2,
};
+ enum SchemeType {
Ilya Sherman 2016/08/10 05:34:26 Please document that this enum is used to back an
lshang 2016/08/11 00:26:50 Done.
+ SCHEME_WILDCARD,
+ SCHEME_HTTP,
+ SCHEME_HTTPS,
+ SCHEME_FILE,
+ SCHEME_CHROMEEXTENSION,
+ SCHEME_OTHER,
+ SCHEME_MAX,
+ };
+
struct PatternParts {
PatternParts();
PatternParts(const PatternParts& other);
@@ -178,6 +188,9 @@ class ContentSettingsPattern {
// Returns a std::string representation of this pattern.
std::string ToString() const;
+ // Returns scheme type of pattern.
+ ContentSettingsPattern::SchemeType GetScheme() const;
+
// Compares the pattern with a given |other| pattern and returns the
// |Relation| of the two patterns.
Relation Compare(const ContentSettingsPattern& other) const;

Powered by Google App Engine
This is Rietveld 408576698