From 541f86dc91430346714f91b81ea6779d8c7f6add Mon Sep 17 00:00:00 2001 From: Federico Cappelli Date: Mon, 15 Apr 2024 16:56:13 +0100 Subject: [PATCH] switch default removed --- .../NetworkProtectionPixelEvent.swift | 77 ++++++++++++++++++- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift index 1792a9b298..2446ab0ac5 100644 --- a/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift +++ b/DuckDuckGo/NetworkProtection/AppAndExtensionAndAgentTargets/NetworkProtectionPixelEvent.swift @@ -292,7 +292,43 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { return [PixelKit.Parameters.errorCode: String(code)] case .networkProtectionWireguardErrorInvalidState(reason: let reason): return [PixelKit.Parameters.reason: reason] - default: + case .networkProtectionActiveUser, + .networkProtectionNewUser, + .networkProtectionControllerStartAttempt, + .networkProtectionControllerStartSuccess, + .networkProtectionControllerStartFailure, + .networkProtectionTunnelStartAttempt, + .networkProtectionTunnelStartSuccess, + .networkProtectionTunnelStartFailure, + .networkProtectionTunnelUpdateAttempt, + .networkProtectionTunnelUpdateSuccess, + .networkProtectionTunnelUpdateFailure, + .networkProtectionEnableAttemptConnecting, + .networkProtectionEnableAttemptSuccess, + .networkProtectionEnableAttemptFailure, + .networkProtectionTunnelFailureDetected, + .networkProtectionTunnelFailureRecovered, + .networkProtectionLatency, + .networkProtectionLatencyError, + .networkProtectionTunnelConfigurationNoServerRegistrationInfo, + .networkProtectionTunnelConfigurationCouldNotSelectClosestServer, + .networkProtectionTunnelConfigurationCouldNotGetPeerPublicKey, + .networkProtectionTunnelConfigurationCouldNotGetPeerHostName, + .networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange, + .networkProtectionClientFailedToParseServerListResponse, + .networkProtectionClientFailedToEncodeRegisterKeyRequest, + .networkProtectionClientFailedToParseRegisteredServersResponse, + .networkProtectionClientFailedToEncodeRedeemRequest, + .networkProtectionClientInvalidInviteCode, + .networkProtectionClientFailedToParseRedeemResponse, + .networkProtectionClientInvalidAuthToken, + .networkProtectionWireguardErrorCannotLocateTunnelFileDescriptor, + .networkProtectionWireguardErrorFailedDNSResolution, + .networkProtectionNoAuthTokenFoundError, + .networkProtectionRekeyAttempt, + .networkProtectionRekeyCompleted, + .networkProtectionRekeyFailure, + .networkProtectionSystemExtensionActivationFailure: return nil } } @@ -314,7 +350,44 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 { .networkProtectionUnhandledError(_, _, let error), .networkProtectionSystemExtensionActivationFailure(let error): return error - default: + case .networkProtectionActiveUser, + .networkProtectionNewUser, + .networkProtectionControllerStartAttempt, + .networkProtectionControllerStartSuccess, + .networkProtectionTunnelStartAttempt, + .networkProtectionTunnelStartSuccess, + .networkProtectionTunnelUpdateAttempt, + .networkProtectionTunnelUpdateSuccess, + .networkProtectionEnableAttemptConnecting, + .networkProtectionEnableAttemptSuccess, + .networkProtectionEnableAttemptFailure, + .networkProtectionTunnelFailureDetected, + .networkProtectionTunnelFailureRecovered, + .networkProtectionLatency, + .networkProtectionLatencyError, + .networkProtectionTunnelConfigurationNoServerRegistrationInfo, + .networkProtectionTunnelConfigurationCouldNotSelectClosestServer, + .networkProtectionTunnelConfigurationCouldNotGetPeerPublicKey, + .networkProtectionTunnelConfigurationCouldNotGetPeerHostName, + .networkProtectionTunnelConfigurationCouldNotGetInterfaceAddressRange, + .networkProtectionClientFailedToParseServerListResponse, + .networkProtectionClientFailedToEncodeRegisterKeyRequest, + .networkProtectionClientFailedToParseRegisteredServersResponse, + .networkProtectionClientFailedToEncodeRedeemRequest, + .networkProtectionClientInvalidInviteCode, + .networkProtectionClientInvalidAuthToken, + .networkProtectionKeychainErrorFailedToCastKeychainValueToData, + .networkProtectionKeychainReadError, + .networkProtectionKeychainWriteError, + .networkProtectionKeychainUpdateError, + .networkProtectionKeychainDeleteError, + .networkProtectionWireguardErrorCannotLocateTunnelFileDescriptor, + .networkProtectionWireguardErrorInvalidState, + .networkProtectionWireguardErrorFailedDNSResolution, + .networkProtectionWireguardErrorCannotStartWireguardBackend, + .networkProtectionNoAuthTokenFoundError, + .networkProtectionRekeyAttempt, + .networkProtectionRekeyCompleted: return nil } }