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

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

Issue 480393002: Move the security interstitials into a single folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments Created 6 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: chrome/browser/resources/ssl/interstitial_v2.js
diff --git a/chrome/browser/resources/ssl/interstitial_v2.js b/chrome/browser/resources/ssl/interstitial_v2.js
deleted file mode 100644
index dbe4e24b6469dbc1eea928babe1825053bb1128a..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/ssl/interstitial_v2.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This is the shared code for the new (Chrome 37) security interstitials. It is
-// used for both SSL interstitials and Safe Browsing interstitials.
-
-var expandedDetails = false;
-
-function setupEvents() {
- var overridable = loadTimeData.getBoolean('overridable');
- var ssl = loadTimeData.getBoolean('ssl');
-
- if (ssl) {
- $('body').classList.add('ssl');
- $('error-code').textContent = loadTimeData.getString('errorCode');
- $('error-code').classList.remove('hidden');
- } else {
- $('body').classList.add('safe-browsing');
- }
-
- $('primary-button').addEventListener('click', function() {
- if (!ssl)
- sendCommand(SB_CMD_TAKE_ME_BACK);
- else if (overridable)
- sendCommand(CMD_DONT_PROCEED);
- else
- sendCommand(CMD_RELOAD);
- });
-
- if (overridable) {
- $('proceed-link').addEventListener('click', function(event) {
- sendCommand(ssl ? CMD_PROCEED : SB_CMD_PROCEED);
- });
- } else if (!ssl) {
- $('final-paragraph').classList.add('hidden');
- }
-
- 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)
- sendCommand(CMD_HELP);
- else if (loadTimeData.getBoolean('phishing'))
- sendCommand(SB_CMD_LEARN_MORE_2);
- else
- sendCommand(SB_CMD_SHOW_DIAGNOSTIC);
- });
- }
-
- if (ssl && $('clock-link')) {
- $('clock-link').addEventListener('click', function(event) {
- sendCommand(CMD_CLOCK);
- });
- }
-
- $('details-button').addEventListener('click', function(event) {
- var hiddenDetails = $('details').classList.toggle('hidden');
- $('details-button').innerText = hiddenDetails ?
- loadTimeData.getString('openDetails') :
- loadTimeData.getString('closeDetails');
- if (!expandedDetails) {
- // Record a histogram entry only the first time that details is opened.
- sendCommand(ssl ? CMD_MORE : SB_CMD_EXPANDED_SEE_MORE);
- expandedDetails = true;
- }
- });
-
- preventDefaultOnPoundLinkClicks();
- setupCheckbox();
-}
-
-document.addEventListener('DOMContentLoaded', setupEvents);
« no previous file with comments | « chrome/browser/resources/ssl/interstitial_v2.html ('k') | chrome/browser/resources/ssl/ssl_errors_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698