Skip to content

Commit

Permalink
[M110][URLFiltering] Report a UrlFilteringInterstitial Event on bypas…
Browse files Browse the repository at this point in the history
…sing Enterprise Warn Interstitial

(cherry picked from commit 364529a)

Bug: 1402746
Change-Id: I0706c764584acbed307c2e3d390d283c811e65b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4116021
Reviewed-by: Xinghui Lu <xinghuilu@chromium.org>
Commit-Queue: Sneha Nagpaul <snehanagpaul@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1085626}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4133369
Cr-Commit-Position: refs/branch-heads/5481@{#139}
Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
  • Loading branch information
Sneha Nagpaul authored and Chromium LUCI CQ committed Jan 5, 2023
1 parent 9aa7b48 commit 044261f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/safe_browsing/content/browser/ui_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,23 @@ void SafeBrowsingUIManager::OnBlockingPageDone(
BaseUIManager::OnBlockingPageDone(resources, proceed, web_contents,
main_frame_url, showed_interstitial);
if (proceed && !resources.empty()) {
#if !BUILDFLAG(IS_ANDROID)
if (base::FeatureList::IsEnabled((kRealTimeUrlFilteringForEnterprise)) &&
resources[0].threat_type ==
safe_browsing::SB_THREAT_TYPE_MANAGED_POLICY_WARN) {
delegate_->TriggerUrlFilteringInterstitialExtensionEventIfDesired(
web_contents, main_frame_url, "ENTERPRISE_WARNED_BYPASS",
resources[0].rt_lookup_response);
return;
}
#endif
delegate_->TriggerSecurityInterstitialProceededExtensionEventIfDesired(
web_contents, main_frame_url,
GetThreatTypeStringForInterstitial(resources[0].threat_type),
/*net_error_code=*/0);
}
}

// Static.
GURL SafeBrowsingUIManager::GetMainFrameAllowlistUrlForResourceForTesting(
const security_interstitials::UnsafeResource& resource) {
Expand Down

0 comments on commit 044261f

Please sign in to comment.