Bug 1539628 - Add skipURLs prefs for all content blocking features; r=baku
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 10 Apr 2019 15:11:19 +0000
changeset 468783 8b9ea853cdca063b3b68f67b705ba1837732eb27
parent 468782 2bb8fcac7edfed5ffad76f0b2df33682b830f48b
child 468784 2aceb1e2f211144d9b0426f9a1723e8d9c03afb9
push id35850
push userdvarga@mozilla.com
push dateWed, 10 Apr 2019 21:52:56 +0000
treeherdermozilla-central@9d3dbe3fef26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1539628
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1539628 - Add skipURLs prefs for all content blocking features; r=baku Differential Revision: https://phabricator.services.mozilla.com/D26604
netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureCryptominingAnnotation.cpp
@@ -22,16 +22,18 @@ namespace {
 #define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST \
   "urlclassifier.features.cryptomining.annotate.blacklistTables"
 #define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.annotate.blacklistHosts"
 #define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST \
   "urlclassifier.features.cryptomining.annotate.whitelistTables"
 #define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.annotate.whitelistHosts"
+#define URLCLASSIFIER_CRYPTOMINING_ANNOTATION_SKIP_URLS \
+  "urlclassifier.features.cryptomining.annotate.skipURLs"
 #define TABLE_CRYPTOMINING_ANNOTATION_BLACKLIST_PREF \
   "cryptomining-annotate-blacklist-pref"
 #define TABLE_CRYPTOMINING_ANNOTATION_WHITELIST_PREF \
   "cryptomining-annotate-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureCryptominingAnnotation>
     gFeatureCryptominingAnnotation;
 
@@ -44,17 +46,18 @@ UrlClassifierFeatureCryptominingAnnotati
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_CRYPTOMINING_ANNOTATION_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_CRYPTOMINING_ANNOTATION_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_ANNOTATION_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_ANNOTATION_WHITELIST_PREF),
-          EmptyCString()) {}
+          NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_ANNOTATION_SKIP_URLS)) {
+}
 
 /* static */ const char* UrlClassifierFeatureCryptominingAnnotation::Name() {
   return CRYPTOMINING_ANNOTATION_FEATURE_NAME;
 }
 
 /* static */
 void UrlClassifierFeatureCryptominingAnnotation::MaybeInitialize() {
   UC_LOG(("UrlClassifierFeatureCryptominingAnnotation: MaybeInitialize"));
--- a/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureCryptominingProtection.cpp
@@ -22,16 +22,18 @@ namespace {
 #define URLCLASSIFIER_CRYPTOMINING_BLACKLIST \
   "urlclassifier.features.cryptomining.blacklistTables"
 #define URLCLASSIFIER_CRYPTOMINING_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.blacklistHosts"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST \
   "urlclassifier.features.cryptomining.whitelistTables"
 #define URLCLASSIFIER_CRYPTOMINING_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.cryptomining.whitelistHosts"
+#define URLCLASSIFIER_CRYPTOMINING_SKIP_URLS \
+  "urlclassifier.features.cryptomining.skipURLs"
 #define TABLE_CRYPTOMINING_BLACKLIST_PREF "cryptomining-blacklist-pref"
 #define TABLE_CRYPTOMINING_WHITELIST_PREF "cryptomining-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureCryptominingProtection>
     gFeatureCryptominingProtection;
 
 }  // namespace
 
@@ -40,17 +42,17 @@ UrlClassifierFeatureCryptominingProtecti
     : UrlClassifierFeatureBase(
           NS_LITERAL_CSTRING(CRYPTOMINING_FEATURE_NAME),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_WHITELIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_CRYPTOMINING_WHITELIST_PREF),
-          EmptyCString()) {}
+          NS_LITERAL_CSTRING(URLCLASSIFIER_CRYPTOMINING_SKIP_URLS)) {}
 
 /* static */ const char* UrlClassifierFeatureCryptominingProtection::Name() {
   return CRYPTOMINING_FEATURE_NAME;
 }
 
 /* static */
 void UrlClassifierFeatureCryptominingProtection::MaybeInitialize() {
   UC_LOG(("UrlClassifierFeatureCryptominingProtection: MaybeInitialize"));
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingAnnotation.cpp
@@ -22,16 +22,18 @@ namespace {
 #define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST \
   "urlclassifier.features.fingerprinting.annotate.blacklistTables"
 #define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.annotate.blacklistHosts"
 #define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST \
   "urlclassifier.features.fingerprinting.annotate.whitelistTables"
 #define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.annotate.whitelistHosts"
+#define URLCLASSIFIER_FINGERPRINTING_ANNOTATION_SKIP_URLS \
+  "urlclassifier.features.fingerprinting.annotate.skipURLs"
 #define TABLE_FINGERPRINTING_ANNOTATION_BLACKLIST_PREF \
   "fingerprinting-annotate-blacklist-pref"
 #define TABLE_FINGERPRINTING_ANNOTATION_WHITELIST_PREF \
   "fingerprinting-annotate-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureFingerprintingAnnotation>
     gFeatureFingerprintingAnnotation;
 
@@ -44,17 +46,18 @@ UrlClassifierFeatureFingerprintingAnnota
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_ANNOTATION_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_ANNOTATION_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_ANNOTATION_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_ANNOTATION_WHITELIST_PREF),
-          EmptyCString()) {}
+          NS_LITERAL_CSTRING(
+              URLCLASSIFIER_FINGERPRINTING_ANNOTATION_SKIP_URLS)) {}
 
 /* static */ const char* UrlClassifierFeatureFingerprintingAnnotation::Name() {
   return FINGERPRINTING_ANNOTATION_FEATURE_NAME;
 }
 
 /* static */
 void UrlClassifierFeatureFingerprintingAnnotation::MaybeInitialize() {
   UC_LOG(("UrlClassifierFeatureFingerprintingAnnotation: MaybeInitialize"));
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
@@ -22,16 +22,18 @@ namespace {
 #define URLCLASSIFIER_FINGERPRINTING_BLACKLIST \
   "urlclassifier.features.fingerprinting.blacklistTables"
 #define URLCLASSIFIER_FINGERPRINTING_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.blacklistHosts"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST \
   "urlclassifier.features.fingerprinting.whitelistTables"
 #define URLCLASSIFIER_FINGERPRINTING_WHITELIST_TEST_ENTRIES \
   "urlclassifier.features.fingerprinting.whitelistHosts"
+#define URLCLASSIFIER_FINGERPRINTING_SKIP_URLS \
+  "urlclassifier.features.fingerprinting.skipURLs"
 #define TABLE_FINGERPRINTING_BLACKLIST_PREF "fingerprinting-blacklist-pref"
 #define TABLE_FINGERPRINTING_WHITELIST_PREF "fingerprinting-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureFingerprintingProtection>
     gFeatureFingerprintingProtection;
 
 }  // namespace
 
@@ -42,17 +44,17 @@ UrlClassifierFeatureFingerprintingProtec
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_WHITELIST),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(
               URLCLASSIFIER_FINGERPRINTING_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_BLACKLIST_PREF),
           NS_LITERAL_CSTRING(TABLE_FINGERPRINTING_WHITELIST_PREF),
-          EmptyCString()) {}
+          NS_LITERAL_CSTRING(URLCLASSIFIER_FINGERPRINTING_SKIP_URLS)) {}
 
 /* static */ const char* UrlClassifierFeatureFingerprintingProtection::Name() {
   return FINGERPRINTING_FEATURE_NAME;
 }
 
 /* static */
 void UrlClassifierFeatureFingerprintingProtection::MaybeInitialize() {
   UC_LOG(("UrlClassifierFeatureFingerprintingProtection: MaybeInitialize"));
--- a/netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureTrackingProtection.cpp
@@ -20,32 +20,35 @@ namespace {
 #define TRACKING_PROTECTION_FEATURE_NAME "tracking-protection"
 
 #define URLCLASSIFIER_TRACKING_BLACKLIST "urlclassifier.trackingTable"
 #define URLCLASSIFIER_TRACKING_BLACKLIST_TEST_ENTRIES \
   "urlclassifier.trackingTable.testEntries"
 #define URLCLASSIFIER_TRACKING_WHITELIST "urlclassifier.trackingWhitelistTable"
 #define URLCLASSIFIER_TRACKING_WHITELIST_TEST_ENTRIES \
   "urlclassifier.trackingWhitelistTable.testEntries"
+#define URLCLASSIFIER_TRACKING_PROTECTION_SKIP_URLS \
+  "urlclassifier.trackingSkipURLs"
 #define TABLE_TRACKING_BLACKLIST_PREF "tracking-blacklist-pref"
 #define TABLE_TRACKING_WHITELIST_PREF "tracking-whitelist-pref"
 
 StaticRefPtr<UrlClassifierFeatureTrackingProtection> gFeatureTrackingProtection;
 
 }  // namespace
 
 UrlClassifierFeatureTrackingProtection::UrlClassifierFeatureTrackingProtection()
     : UrlClassifierFeatureBase(
           NS_LITERAL_CSTRING(TRACKING_PROTECTION_FEATURE_NAME),
           NS_LITERAL_CSTRING(URLCLASSIFIER_TRACKING_BLACKLIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_TRACKING_WHITELIST),
           NS_LITERAL_CSTRING(URLCLASSIFIER_TRACKING_BLACKLIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(URLCLASSIFIER_TRACKING_WHITELIST_TEST_ENTRIES),
           NS_LITERAL_CSTRING(TABLE_TRACKING_BLACKLIST_PREF),
-          NS_LITERAL_CSTRING(TABLE_TRACKING_WHITELIST_PREF), EmptyCString()) {}
+          NS_LITERAL_CSTRING(TABLE_TRACKING_WHITELIST_PREF),
+          NS_LITERAL_CSTRING(URLCLASSIFIER_TRACKING_PROTECTION_SKIP_URLS)) {}
 
 /* static */ const char* UrlClassifierFeatureTrackingProtection::Name() {
   return TRACKING_PROTECTION_FEATURE_NAME;
 }
 
 /* static */
 void UrlClassifierFeatureTrackingProtection::MaybeInitialize() {
   MOZ_ASSERT(XRE_IsParentProcess());