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

Side by Side Diff: components/security_interstitials/core/browser/resources/interstitial_v2.js

Issue 2852333003: Rename SafeBrowsingErrorUI to SafeBrowsingLoudErrorUI (Closed)
Patch Set: Move SafeBrowsingErrorUI to SafeBrowsingLoudErrorUI Created 3 years, 7 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
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 var keyPressState = 0; 9 var keyPressState = 0;
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 function toggleDebuggingInfo() { 95 function toggleDebuggingInfo() {
96 $('error-debugging-info').classList.toggle('hidden'); 96 $('error-debugging-info').classList.toggle('hidden');
97 } 97 }
98 98
99 function setupEvents() { 99 function setupEvents() {
100 var overridable = loadTimeData.getBoolean('overridable'); 100 var overridable = loadTimeData.getBoolean('overridable');
101 var interstitialType = loadTimeData.getString('type'); 101 var interstitialType = loadTimeData.getString('type');
102 var ssl = interstitialType == 'SSL'; 102 var ssl = interstitialType == 'SSL';
103 var captivePortal = interstitialType == 'CAPTIVE_PORTAL'; 103 var captivePortal = interstitialType == 'CAPTIVE_PORTAL';
104 var badClock = ssl && loadTimeData.getBoolean('bad_clock'); 104 var badClock = ssl && loadTimeData.getBoolean('bad_clock');
105 var hidePrimaryButton = badClock && loadTimeData.getBoolean( 105 var webView = loadTimeData.getBoolean('webview');
106 var hidePrimaryButton = (badClock || webView) && loadTimeData.getBoolean(
106 'hide_primary_button'); 107 'hide_primary_button');
felt 2017/05/03 18:17:01 I don't think we need this webView variable. We sh
107 108
108 if (ssl) { 109 if (ssl) {
109 $('body').classList.add(badClock ? 'bad-clock' : 'ssl'); 110 $('body').classList.add(badClock ? 'bad-clock' : 'ssl');
110 $('error-code').textContent = loadTimeData.getString('errorCode'); 111 $('error-code').textContent = loadTimeData.getString('errorCode');
111 $('error-code').classList.remove('hidden'); 112 $('error-code').classList.remove('hidden');
112 } else if (captivePortal) { 113 } else if (captivePortal) {
113 $('body').classList.add('captive-portal'); 114 $('body').classList.add('captive-portal');
114 } else { 115 } else {
115 $('body').classList.add('safe-browsing'); 116 $('body').classList.add('safe-browsing');
116 } 117 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 }); 205 });
205 } 206 }
206 207
207 preventDefaultOnPoundLinkClicks(); 208 preventDefaultOnPoundLinkClicks();
208 setupExtendedReportingCheckbox(); 209 setupExtendedReportingCheckbox();
209 setupSSLDebuggingInfo(); 210 setupSSLDebuggingInfo();
210 document.addEventListener('keypress', handleKeypress); 211 document.addEventListener('keypress', handleKeypress);
211 } 212 }
212 213
213 document.addEventListener('DOMContentLoaded', setupEvents); 214 document.addEventListener('DOMContentLoaded', setupEvents);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698