Skip to content

Commit

Permalink
VPN clean-up (#3502)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1207603085593419/1208654487861283/f
Tech Design URL:
CC:

Description:

This PR cleans up some VPN code, namely some pixels from events that no longer exist.
  • Loading branch information
samsymons authored Nov 6, 2024
1 parent ab52710 commit 3aad126
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 27 deletions.
8 changes: 0 additions & 8 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,6 @@ extension Pixel {
case networkProtectionClientFailedToParseRegisteredServersResponse
case networkProtectionClientFailedToFetchLocations
case networkProtectionClientFailedToParseLocationsResponse
case networkProtectionClientFailedToEncodeRedeemRequest
case networkProtectionClientInvalidInviteCode
case networkProtectionClientFailedToRedeemInviteCode
case networkProtectionClientFailedToParseRedeemResponse
case networkProtectionClientInvalidAuthToken

case networkProtectionKeychainErrorFailedToCastKeychainValueToData
Expand Down Expand Up @@ -1239,10 +1235,6 @@ extension Pixel.Event {
case .networkProtectionClientFailedToFetchLocations: return "m_netp_backend_api_error_failed_to_fetch_locations"
case .networkProtectionClientFailedToParseLocationsResponse:
return "m_netp_backend_api_error_parsing_locations_response_failed"
case .networkProtectionClientFailedToEncodeRedeemRequest: return "m_netp_backend_api_error_encoding_redeem_request_body_failed"
case .networkProtectionClientInvalidInviteCode: return "m_netp_backend_api_error_invalid_invite_code"
case .networkProtectionClientFailedToRedeemInviteCode: return "m_netp_backend_api_error_failed_to_redeem_invite_code"
case .networkProtectionClientFailedToParseRedeemResponse: return "m_netp_backend_api_error_parsing_redeem_response_failed"
case .networkProtectionClientInvalidAuthToken: return "m_netp_backend_api_error_invalid_auth_token"
case .networkProtectionKeychainErrorFailedToCastKeychainValueToData: return "m_netp_keychain_error_failed_to_cast_keychain_value_to_data"
case .networkProtectionKeychainReadError: return "m_netp_keychain_error_read_failed"
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10986,7 +10986,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 204.0.0;
version = 205.0.0;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "14594b6f3f3ddbea65be2818298e2e79305d8a26",
"version" : "204.0.0"
"revision" : "1d228b8fde43e7ab5f28e7a511f440676e6b05a8",
"version" : "205.0.0"
}
},
{
Expand Down
11 changes: 0 additions & 11 deletions DuckDuckGo/EventMapping+NetworkProtectionError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ extension EventMapping where Event == NetworkProtectionError {
case .failedToParseLocationListResponse(let error):
pixelEvent = .networkProtectionClientFailedToParseLocationsResponse
pixelError = error
case .failedToEncodeRedeemRequest:
pixelEvent = .networkProtectionClientFailedToEncodeRedeemRequest
case .invalidInviteCode:
pixelEvent = .networkProtectionClientInvalidInviteCode
case .failedToRedeemInviteCode(let error):
pixelEvent = .networkProtectionClientFailedToRedeemInviteCode
pixelError = error
case .failedToParseRedeemResponse(let error):
pixelEvent = .networkProtectionClientFailedToParseRedeemResponse
pixelError = error
case .invalidAuthToken:
pixelEvent = .networkProtectionClientInvalidAuthToken
case .failedToCastKeychainValueToData(field: let field):
Expand Down Expand Up @@ -85,7 +75,6 @@ extension EventMapping where Event == NetworkProtectionError {
.wireGuardInvalidState,
.wireGuardDnsResolution,
.wireGuardSetNetworkSettings,
.failedToRetrieveAuthToken,
.failedToFetchServerStatus,
.failedToParseServerStatusResponse:
pixelEvent = .networkProtectionUnhandledError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,6 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider {
pixelError = eventError
case .failedToParseRegisteredServersResponse:
pixelEvent = .networkProtectionClientFailedToParseRegisteredServersResponse
case .failedToEncodeRedeemRequest, .invalidInviteCode, .failedToRedeemInviteCode, .failedToParseRedeemResponse:
pixelEvent = .networkProtectionUnhandledError
// Should never be sent from the extension
case .invalidAuthToken:
pixelEvent = .networkProtectionClientInvalidAuthToken
case .serverListInconsistency:
Expand Down Expand Up @@ -366,8 +363,6 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider {
params[PixelParameters.function] = function
params[PixelParameters.line] = String(line)
pixelError = error
case .failedToRetrieveAuthToken:
return
case .failedToFetchLocationList:
return
case .failedToParseLocationListResponse:
Expand Down

0 comments on commit 3aad126

Please sign in to comment.