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

Unified Diff: components/security_interstitials/core/browser/resources/interstitial_v2.js

Issue 2257173005: Add "learn more" links to SSL and SB interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update browser tests Created 4 years, 4 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: components/security_interstitials/core/browser/resources/interstitial_v2.js
diff --git a/components/security_interstitials/core/browser/resources/interstitial_v2.js b/components/security_interstitials/core/browser/resources/interstitial_v2.js
index bf3cc158d044a488869ba6dfbd27466ddfdb0d3a..805e6da3a76871e1f20a224c8d12d3090aea4a07 100644
--- a/components/security_interstitials/core/browser/resources/interstitial_v2.js
+++ b/components/security_interstitials/core/browser/resources/interstitial_v2.js
@@ -8,7 +8,7 @@
var expandedDetails = false;
var keyPressState = 0;
-// Should match SecurityInterstitialCommands in security_interstitial_page.h
+// Should match security_interstitials::SecurityInterstitialCommands
var CMD_DONT_PROCEED = 0;
var CMD_PROCEED = 1;
// Ways for user to get more information
@@ -153,13 +153,17 @@ function setupEvents() {
if (ssl && overridable) {
$('proceed-link').classList.add('small-link');
- } else if ($('help-link')) {
- // Overridable SSL page doesn't have this link.
- $('help-link').addEventListener('click', function(event) {
- if (ssl || loadTimeData.getBoolean('phishing'))
- sendCommand(CMD_OPEN_HELP_CENTER);
- else
- sendCommand(CMD_OPEN_DIAGNOSTIC);
+ }
+
+ if ($('diagnostic-link')) {
+ $('diagnostic-link').addEventListener('click', function(event) {
+ sendCommand(CMD_OPEN_DIAGNOSTIC);
+ });
+ }
+
+ if ($('learn-more-link')) {
+ $('learn-more-link').addEventListener('click', function(event) {
+ sendCommand(CMD_OPEN_HELP_CENTER);
});
}

Powered by Google App Engine
This is Rietveld 408576698