From dddb70c2268fa8163e517cbcdfbcb76f198a2325 Mon Sep 17 00:00:00 2001 From: smodi Date: Thu, 21 Nov 2024 14:55:15 -0800 Subject: [PATCH] Adding 4 pixels to track the content blocking rules lookup/fetch --- Core/ContentBlocking.swift | 11 +++++++---- Core/PixelEvent.swift | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Core/ContentBlocking.swift b/Core/ContentBlocking.swift index b4889b73246..ed3f02d1aa7 100644 --- a/Core/ContentBlocking.swift +++ b/Core/ContentBlocking.swift @@ -122,11 +122,14 @@ public final class ContentBlocking { case .contentBlockingLookupRulesSucceeded: domainEvent = .contentBlockingLookupRulesSucceeded - case .contentBlockingFetchRulesSucceeded: - domainEvent = .contentBlockingFetchRulesSucceeded + case .contentBlockingFetchLRCSucceeded: + domainEvent = .contentBlockingFetchLRCSucceeded - case .contentBlockingLookupAndFetchFailed: - domainEvent = .contentBlockingLookupAndFetchFailed + case .contentBlockingNoMatchInLRC: + domainEvent = .contentBlockingNoMatchInLRC + + case .contentBlockingLRCMissing: + domainEvent = .contentBlockingLRCMissing } if let error = error { diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 88db8c38425..9be367ecdb3 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -518,8 +518,9 @@ extension Pixel { case contentBlockingCompilationTime case contentBlockingLookupRulesSucceeded - case contentBlockingFetchRulesSucceeded - case contentBlockingLookupAndFetchFailed + case contentBlockingFetchLRCSucceeded + case contentBlockingNoMatchInLRC + case contentBlockingLRCMissing case ampBlockingRulesCompilationFailed @@ -1358,8 +1359,10 @@ extension Pixel.Event { case .contentBlockingCompilationTime: return "m_content_blocking_compilation_time" case .contentBlockingLookupRulesSucceeded: return "m_content_blocking_lookup_rules_succeeded" - case .contentBlockingFetchRulesSucceeded: return "m_content_blocking_fetch_rules_succeeded" - case .contentBlockingLookupAndFetchFailed: return "m_content_blocking_lookup_and_fetch_failed" + case .contentBlockingFetchLRCSucceeded: return "m_content_blocking_fetch_lrc_succeeded" + case .contentBlockingNoMatchInLRC: return "m_content_blocking_no_match_in_lrc" + case .contentBlockingLRCMissing: return "m_content_blocking_lrc_missing" + case .ampBlockingRulesCompilationFailed: return "m_debug_amp_rules_compilation_failed" case .webKitDidTerminate: return "m_d_wkt"