| Index: chrome/browser/resources/security_warnings/interstitial_v2.js
|
| diff --git a/chrome/browser/resources/security_warnings/interstitial_v2.js b/chrome/browser/resources/security_warnings/interstitial_v2.js
|
| index c8a1ce52c417e36911b16c8d1e79baba026fa6e3..921c9527f57b95c915fc2860161029b276dcac2d 100644
|
| --- a/chrome/browser/resources/security_warnings/interstitial_v2.js
|
| +++ b/chrome/browser/resources/security_warnings/interstitial_v2.js
|
| @@ -25,6 +25,8 @@ var CMD_DONT_REPORT = 9;
|
| var CMD_OPEN_REPORTING_PRIVACY = 10;
|
| // Report a phishing error.
|
| var CMD_REPORT_PHISHING_ERROR = 11;
|
| +// Navigate to suggested URL.
|
| +var CMD_NAVIGATE_SUGGESTED_URL = 12;
|
|
|
| /**
|
| * A convenience method for sending commands to the parent page.
|
| @@ -89,6 +91,8 @@ function setupEvents() {
|
| var badClock = ssl && loadTimeData.getBoolean('bad_clock');
|
| var hidePrimaryButton = badClock && loadTimeData.getBoolean(
|
| 'hide_primary_button');
|
| + var commonNameMismatchInterstitial = loadTimeData.getBoolean(
|
| + 'common_name_mismatch_interstitial');
|
|
|
| if (ssl) {
|
| $('body').classList.add(badClock ? 'bad-clock' : 'ssl');
|
| @@ -174,6 +178,14 @@ function setupEvents() {
|
| });
|
| }
|
|
|
| + if (commonNameMismatchInterstitial) {
|
| + // Send a command if user clicks the suggested URL.
|
| + $('suggest-link').addEventListener('click', function(event) {
|
| + sendCommand(CMD_NAVIGATE_SUGGESTED_URL);
|
| + });
|
| + }
|
| +
|
| +
|
| // TODO(felt): This should be simplified once the Finch trial is no longer
|
| // needed.
|
| if (interstitialType == 'SAFEBROWSING' &&
|
|
|