Bug 1358333 - Fix APPLICATION_REPUTATION_ALLOWLIST_MATCH and APPLICATION_REPUTATION_BLOCKLIST_MATCH telemetry r=francois
authorThomas Nguyen <tnguyen@mozilla.com>
Fri, 21 Apr 2017 11:18:34 +0800
changeset 402419 fee151a11c16
parent 402418 fe2fff734281
child 402420 fd25c2c275fc
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1358333
milestone55.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 1358333 - Fix APPLICATION_REPUTATION_ALLOWLIST_MATCH and APPLICATION_REPUTATION_BLOCKLIST_MATCH telemetry r=francois 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