Fix SBER reporting for subresource interstitials
This CL prevents an extra report from being created when showing an
interstitial for a bad subresource, which caused reporting to break
for subresource triggered committed interstitials. This also re-enables
the test for this behavior.
Bug: 1024015
Change-Id: I0bd601a2adfc70dc46ca34d5de0518f26dce4932
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913709
Commit-Queue: Carlos IL <[email protected]>
Reviewed-by: Varun Khaneja <[email protected]>
Cr-Commit-Position: refs/heads/master@{#719701}
diff --git a/chrome/browser/safe_browsing/ui_manager_unittest.cc b/chrome/browser/safe_browsing/ui_manager_unittest.cc
index ec739ec2..e37dac8 100644
--- a/chrome/browser/safe_browsing/ui_manager_unittest.cc
+++ b/chrome/browser/safe_browsing/ui_manager_unittest.cc
@@ -447,14 +447,15 @@
unsafe_resources,
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions(
BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources),
- false, // is_extended_reporting_opt_in_allowed
- false, // is_off_the_record
- false, // is_extended_reporting_enabled
- false, // is_extended_reporting_policy_managed
- false, // is_proceed_anyway_disabled
- true, // should_open_links_in_new_tab
- true, // always_show_back_to_safety
- "cpn_safe_browsing")) { // help_center_article_link
+ false, // is_extended_reporting_opt_in_allowed
+ false, // is_off_the_record
+ false, // is_extended_reporting_enabled
+ false, // is_extended_reporting_policy_managed
+ false, // is_proceed_anyway_disabled
+ true, // should_open_links_in_new_tab
+ true, // always_show_back_to_safety
+ "cpn_safe_browsing"), // help_center_article_link
+ true) { // should_trigger_reporting
// Don't delay details at all for the unittest.
SetThreatDetailsProceedDelayForTesting(0);
DontCreateViewForTesting();
@@ -472,8 +473,8 @@
BaseUIManager* delegate,
content::WebContents* web_contents,
const GURL& main_frame_url,
- const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources)
- override {
+ const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources,
+ bool should_trigger_reporting) override {
return new TestSafeBrowsingBlockingPage(delegate, web_contents,
main_frame_url, unsafe_resources);
}