Skip to content

Commit

Permalink
Remove unused VPN logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Oct 30, 2024
1 parent 8f94eaf commit 892790e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 28 deletions.
8 changes: 0 additions & 8 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,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 @@ -1215,10 +1211,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
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10917,8 +10917,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 201.0.0;
branch = "sam/vpn-clean-up";
kind = branch;
};
};
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" : "e5946eee6af859690cc1cc5e51daef3c8368981b",
"version" : "201.0.0"
"branch" : "sam/vpn-clean-up",
"revision" : "24783ae7153feadefab62ab590fe90cf38516f5a"
}
},
{
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 @@ -312,9 +312,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 @@ -362,8 +359,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 892790e

Please sign in to comment.