Skip to content

Commit

Permalink
Add privacy config version to broken site reports (#3351)
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayterDev authored Sep 16, 2024
1 parent 9ed705c commit 35b7a45
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10885,7 +10885,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 195.0.0;
version = 196.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" : "f9134f887b1215779a1050134d09d7e824a8abc0",
"version" : "195.0.0"
"revision" : "ae3dbec01b8b72dc2ea4c510aecbc802862eab63",
"version" : "196.0.0"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/AutofillLoginListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ final class AutofillLoginListViewModel: ObservableObject {
manufacturer: "",
upgradedHttps: false,
tdsETag: nil,
configVersion: nil,
blockedTrackerDomains: nil,
installedSurrogates: nil,
isGPCEnabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ extension PrivacyDashboardViewController {
manufacturer: "Apple",
upgradedHttps: breakageAdditionalInfo.httpsForced,
tdsETag: ContentBlocking.shared.contentBlockingManager.currentMainRules?.etag ?? "",
configVersion: privacyConfigurationManager.privacyConfig.version,
blockedTrackerDomains: blockedTrackerDomains,
installedSurrogates: privacyInfo.trackerInfo.installedSurrogates.map { $0 },
isGPCEnabled: AppDependencyProvider.shared.appSettings.sendDoNotSell,
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGoTests/BrokenSiteReportingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ final class BrokenSiteReportingTests: XCTestCase {
manufacturer: test.manufacturer ?? "",
upgradedHttps: test.wasUpgraded,
tdsETag: test.blocklistVersion,
configVersion: test.remoteConfigVersion,
blockedTrackerDomains: test.blockedTrackers,
installedSurrogates: test.surrogates,
isGPCEnabled: test.gpcEnabled ?? false,
Expand Down Expand Up @@ -169,6 +170,7 @@ private struct Test: Codable {
let providedDescription: String?
let blockedTrackers, surrogates: [String]
let atb, blocklistVersion: String
let remoteConfigVersion: String?
let expectReportURLPrefix: String
let expectReportURLParams: [ExpectReportURLParam]
let exceptPlatforms: [String]
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGoTests/MockPrivacyConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class MockPrivacyConfiguration: PrivacyConfiguration {
}

var identifier: String = "MockPrivacyConfiguration"
var version: String? = "123456789"
var userUnprotectedDomains: [String] = []
var tempUnprotectedDomains: [String] = []
var trackerAllowlist: PrivacyConfigurationData.TrackerAllowlist = .init(entries: [:],
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGoTests/PrivacyConfigurationManagerMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import BrowserServicesKit
class PrivacyConfigurationMock: PrivacyConfiguration {

var identifier: String = "id"
var version: String? = "123456789"

var userUnprotectedDomains: [String] = []

Expand Down

0 comments on commit 35b7a45

Please sign in to comment.