Bug 1358333 - Fix APPLICATION_REPUTATION_ALLOWLIST_MATCH and APPLICATION_REPUTATION_BLOCKLIST_MATCH telemetry draft
authorThomas Nguyen <tnguyen@mozilla.com>
Fri, 21 Apr 2017 11:18:34 +0800
changeset 566182 143bf01bf1b7e327445997a7c904de6b57809218
parent 564098 bb38d935d699e0529f9e0bb35578d381026415c4
child 625226 eaf00403c2eeec3703c7d65231e3f7e57f593fce
push id55122
push userbmo:tnguyen@mozilla.com
push dateFri, 21 Apr 2017 03:20:04 +0000
bugs1358333
milestone55.0a1
Bug 1358333 - Fix APPLICATION_REPUTATION_ALLOWLIST_MATCH and APPLICATION_REPUTATION_BLOCKLIST_MATCH telemetry MozReview-Commit-ID: DbI0uNdEwZ8
toolkit/components/downloads/ApplicationReputation.cpp
--- a/toolkit/components/downloads/ApplicationReputation.cpp
+++ b/toolkit/components/downloads/ApplicationReputation.cpp
@@ -153,18 +153,18 @@ LookupTablesInPrefs(const nsACString& ta
     found = true;
 
     if (!shouldRecordTelemetry) {
       return found;
     }
 
     // We are checking if the table found is V2 or V4 to record telemetry
     // Both V2 and V4 begin with "goog" but V4 ends with "-proto"
-    if (StringBeginsWith(prefToken, NS_LITERAL_CSTRING("goog"))) {
-      if (StringEndsWith(prefToken, NS_LITERAL_CSTRING("-proto"))) {
+    if (StringBeginsWith(table, NS_LITERAL_CSTRING("goog"))) {
+      if (StringEndsWith(table, NS_LITERAL_CSTRING("-proto"))) {
         telemetryInfo |= TelemetryMatchInfo::eV4Match;
       } else {
         telemetryInfo |= TelemetryMatchInfo::eV2Match;
       }
     }
   }
 
   // Record telemetry for matching allow list and block list