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

Side by Side Diff: chrome/browser/resources/ssl/interstitial_v2.js

Issue 330753002: Browser and unit tests for the SB interstitial V3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed rebase-induced bugs Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the shared code for the new (Chrome 37) security interstitials. It is 5 // This is the shared code for the new (Chrome 37) security interstitials. It is
6 // used for both SSL interstitials and Safe Browsing interstitials. 6 // used for both SSL interstitials and Safe Browsing interstitials.
7 7
8 var expandedDetails = false; 8 var expandedDetails = false;
9 9
10 function setupEvents() { 10 function setupEvents() {
(...skipping 12 matching lines...) Expand all
23 sendCommand(CMD_DONT_PROCEED); 23 sendCommand(CMD_DONT_PROCEED);
24 else 24 else
25 sendCommand(CMD_RELOAD); 25 sendCommand(CMD_RELOAD);
26 }); 26 });
27 27
28 if (overridable) { 28 if (overridable) {
29 $('proceed-link').addEventListener('click', function(event) { 29 $('proceed-link').addEventListener('click', function(event) {
30 sendCommand(ssl ? CMD_PROCEED : SB_CMD_PROCEED); 30 sendCommand(ssl ? CMD_PROCEED : SB_CMD_PROCEED);
31 }); 31 });
32 } else if (!ssl) { 32 } else if (!ssl) {
33 $('finalParagraph').classList.add('hidden'); 33 $('final-paragraph').classList.add('hidden');
34 } 34 }
35 35
36 if (ssl && overridable) { 36 if (ssl && overridable) {
37 $('proceed-link').classList.add('small-link'); 37 $('proceed-link').classList.add('small-link');
38 } else { 38 } else {
39 // Overridable SSL page doesn't have this link. 39 // Overridable SSL page doesn't have this link.
40 $('help-link').addEventListener('click', function(event) { 40 $('help-link').addEventListener('click', function(event) {
41 if (ssl) 41 if (ssl)
42 sendCommand(CMD_HELP); 42 sendCommand(CMD_HELP);
43 else if (loadTimeData.getBoolean('phishing')) 43 else if (loadTimeData.getBoolean('phishing'))
(...skipping 17 matching lines...) Expand all
61 // Record a histogram entry only the first time that details is opened. 61 // Record a histogram entry only the first time that details is opened.
62 sendCommand(ssl ? CMD_MORE : SB_CMD_EXPANDED_SEE_MORE); 62 sendCommand(ssl ? CMD_MORE : SB_CMD_EXPANDED_SEE_MORE);
63 expandedDetails = true; 63 expandedDetails = true;
64 } 64 }
65 }); 65 });
66 66
67 preventDefaultOnPoundLinkClicks(); 67 preventDefaultOnPoundLinkClicks();
68 } 68 }
69 69
70 document.addEventListener('DOMContentLoaded', setupEvents); 70 document.addEventListener('DOMContentLoaded', setupEvents);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698