Skip to content

Commit

Permalink
Merge branch 'bugfix/WebUI-iOS-AboutFlags' into privacy/ios-blocked-r…
Browse files Browse the repository at this point in the history
…equests-view
  • Loading branch information
StephenHeaps committed Dec 11, 2024
2 parents 82b1ecc + c730f2b commit d1cc491
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ extension ContentBlockerHelper: TabContentScript {
guard !self.blockedRequests.contains(where: { $0.requestURL == requestURL }) else {
return
}
let info = BlockedRequestInfo(
requestURL: requestURL,
sourceURL: sourceURL,
resourceType: dto.resourceType,
isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive,
location: .contentBlocker
self.blockedRequests.append(
.init(
requestURL: requestURL,
sourceURL: sourceURL,
resourceType: dto.resourceType,
isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive,
location: .contentBlocker
)
)
self.blockedRequests.append(info)

// Increase global stats (here due to BlocklistName being in Client and BraveGlobalShieldStats being
// in BraveShared)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ class RequestBlockingContentScriptHandler: TabContentScript {
BraveGlobalShieldStats.shared.adblock += 1
let stats = tab.contentBlocker.stats
tab.contentBlocker.stats = stats.adding(adCount: 1)
let info = BlockedRequestInfo(
requestURL: requestURL,
sourceURL: windowOriginURL,
resourceType: dto.data.resourceType,
isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive,
location: .requestBlocking
tab.contentBlocker.blockedRequests.append(
.init(
requestURL: requestURL,
sourceURL: windowOriginURL,
resourceType: dto.data.resourceType,
isAggressive: domain.globalBlockAdsAndTrackingLevel.isAggressive,
location: .requestBlocking
)
)
tab.contentBlocker.blockedRequests.append(info)
}

replyHandler(shouldBlock, nil)
Expand Down
10 changes: 8 additions & 2 deletions ui/webui/resources/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,22 @@ brave_resources_extra_grdps = []
brave_resources_extra_grdps_deps = []

# ios does not need any static resources
if (!is_ios) {
if (is_ios) {
brave_resources_extra_grdps += [
"$brave_resources_extra_grdps_path/brave_static_resources.grdp",
"$root_gen_dir/brave/web-ui-leo/leo.grdp",
]
} else {
brave_resources_extra_grdps += [
"$brave_resources_extra_grdps_path/brave_fonts_resources.grdp",
"$brave_resources_extra_grdps_path/brave_static_resources.grdp",
"$brave_resources_extra_grdps_path/brave_icons_resources.grdp",
"$root_gen_dir/brave/web-ui-leo/leo.grdp",
]
brave_resources_extra_grdps_deps += [ "//brave/ui/webui/resources:grdp" ]
}

brave_resources_extra_grdps_deps += [ "//brave/ui/webui/resources:grdp" ]

# At the moment, all non-static resources are only required for polymer WebUI.
# This could change and, when it does, the `include_polymer` conditional can be removed
# here and the one in //brave/ui/webui/resources/BUILD.gn be relied on to only add
Expand Down

0 comments on commit d1cc491

Please sign in to comment.