Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: chrome/browser/resources/security_warnings/interstitial_v2.js

Issue 1223233002: Common Name Mismatch Handler For WWW Subdomain Mismatch case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor Changes: Removing test code Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
meacer 2015/07/28 01:18:05 nit: CMD_OPEN_SUGGESTED_URL instead, to be consist
Bhanu Dev 2015/07/30 02:39:09 Done.
/**
* 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(
meacer 2015/07/28 01:18:05 Could also check for |ssl| here: var commonNameMi
Bhanu Dev 2015/07/30 02:39:09 Done.
+ 'common_name_mismatch_interstitial');
meacer 2015/07/28 01:18:05 nit: common_name_mismatch instead of common_name_m
Bhanu Dev 2015/07/30 02:39:09 Done.
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);
+ });
+ }
meacer 2015/07/28 01:18:05 Move this block above |if (captivePortal)| since i
Bhanu Dev 2015/07/30 02:39:09 Done.
+
+
meacer 2015/07/28 01:18:04 Remove extra line
Bhanu Dev 2015/07/30 02:39:09 Done.
// TODO(felt): This should be simplified once the Finch trial is no longer
// needed.
if (interstitialType == 'SAFEBROWSING' &&

Powered by Google App Engine
This is Rietveld 408576698