Commit 35c4015c authored by Tim Volodine's avatar Tim Volodine Committed by Commit Bot

[WebLayer] Make error_page_helper handle commands for safebrowsing committed interstitials

Some safebrowsing specific interstitial commands do not work in the
current weblayer implementation when committed interstitials are
enabled (kCommittedSBInterstitials).

This patch makes sure to handle safebrowsing specific interstitial
commands such as CMD_OPEN_DIAGNOSTIC and CMD_REPORT_PHISHING_ERROR.
The CMD_OPEN_DIAGNOSTIC command loads "google transparency report"
site with "safe browsing site status". The CMD_REPORT_PHISHING_ERROR
command proceeds to the "report incorrect phishing warning" site.

BUG=1044596,1042662

Change-Id: I092c3574222f51e30b8c4159eb2fa6e1a4bf0d30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044192
Commit-Queue: Tim Volodine <timvolodine@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741076}
parent f6884ea4
...@@ -63,6 +63,10 @@ void ErrorPageHelper::SendCommand( ...@@ -63,6 +63,10 @@ void ErrorPageHelper::SendCommand(
case security_interstitials::CMD_OPEN_HELP_CENTER: case security_interstitials::CMD_OPEN_HELP_CENTER:
interface->OpenHelpCenter(); interface->OpenHelpCenter();
break; break;
case security_interstitials::CMD_OPEN_DIAGNOSTIC:
// Used by safebrowsing interstials.
interface->OpenDiagnostic();
break;
case security_interstitials::CMD_RELOAD: case security_interstitials::CMD_RELOAD:
interface->Reload(); interface->Reload();
break; break;
...@@ -72,13 +76,16 @@ void ErrorPageHelper::SendCommand( ...@@ -72,13 +76,16 @@ void ErrorPageHelper::SendCommand(
case security_interstitials::CMD_OPEN_DATE_SETTINGS: case security_interstitials::CMD_OPEN_DATE_SETTINGS:
interface->OpenDateSettings(); interface->OpenDateSettings();
break; break;
case security_interstitials::CMD_OPEN_DIAGNOSTIC: case security_interstitials::CMD_REPORT_PHISHING_ERROR:
// Used by safebrowsing phishing interstitial.
interface->ReportPhishingError();
break;
case security_interstitials::CMD_DO_REPORT: case security_interstitials::CMD_DO_REPORT:
case security_interstitials::CMD_DONT_REPORT: case security_interstitials::CMD_DONT_REPORT:
case security_interstitials::CMD_OPEN_REPORTING_PRIVACY: case security_interstitials::CMD_OPEN_REPORTING_PRIVACY:
case security_interstitials::CMD_OPEN_WHITEPAPER: case security_interstitials::CMD_OPEN_WHITEPAPER:
case security_interstitials::CMD_REPORT_PHISHING_ERROR: // Commands not used by the generic SSL error pages.
// Commands not used by the generic SSL error page. // Also not currently used by the safebrowsing error pages.
NOTREACHED(); NOTREACHED();
break; break;
case security_interstitials::CMD_ERROR: case security_interstitials::CMD_ERROR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment