diff options
author | felt@chromium.org <felt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 07:19:07 +0000 |
---|---|---|
committer | felt@chromium.org <felt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-05 07:19:07 +0000 |
commit | d26ff701b62b9ef17d484ff2ae333de79b31174b (patch) | |
tree | 30109a9cc6b16d1b3f52a46201eb93db40b86993 /chrome/browser/resources/ssl | |
parent | 3e52f3bc6c96b2dbe4835812ebe38663683b8ee6 (diff) | |
download | chromium_src-d26ff701b62b9ef17d484ff2ae333de79b31174b.zip chromium_src-d26ff701b62b9ef17d484ff2ae333de79b31174b.tar.gz chromium_src-d26ff701b62b9ef17d484ff2ae333de79b31174b.tar.bz2 |
- Make the V2 interstitial support non-overridable errors.
- Make the V2 interstitial the default, and the V1 non-default (Finch-controlled).
BUG=331453
for chrome/browser/browser_resources.grd:
TBR=sky@chromium.org
everything passes except the broken android gn thing:
NOTRY=true
Review URL: https://codereview.chromium.org/317573002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ssl')
-rw-r--r-- | chrome/browser/resources/ssl/interstitial_v2.css (renamed from chrome/browser/resources/ssl/overridable_v2.css) | 8 | ||||
-rw-r--r-- | chrome/browser/resources/ssl/interstitial_v2.html (renamed from chrome/browser/resources/ssl/overridable_v2.html) | 8 | ||||
-rw-r--r-- | chrome/browser/resources/ssl/interstitial_v2.js (renamed from chrome/browser/resources/ssl/overridable_v2.js) | 28 | ||||
-rw-r--r-- | chrome/browser/resources/ssl/ssl_errors_common.js | 1 |
4 files changed, 32 insertions, 13 deletions
diff --git a/chrome/browser/resources/ssl/overridable_v2.css b/chrome/browser/resources/ssl/interstitial_v2.css index f0d3205..2ea38bb 100644 --- a/chrome/browser/resources/ssl/overridable_v2.css +++ b/chrome/browser/resources/ssl/interstitial_v2.css @@ -18,6 +18,7 @@ button { border-radius: 2px; box-sizing: border-box; color: #fff; + cursor: pointer; float: right; margin: -6px 0 0; padding: 8px 24px; @@ -39,7 +40,10 @@ h1 { } .icon { - background: url(images/lock_red.png) no-repeat; + background: -webkit-image-set( + url('images/1x/brokenssl_red.png') 1x, + url('images/2x/brokenssl_red.png') 2x); + background-repeat: no-repeat; background-size: 100%; height: 69px; margin: 0 0 40px; @@ -49,7 +53,7 @@ h1 { .interstitial-wrapper { box-sizing: border-box; margin: 10% auto 0; - max-width: 582px; + max-width: 552px; width: 100%; } diff --git a/chrome/browser/resources/ssl/overridable_v2.html b/chrome/browser/resources/ssl/interstitial_v2.html index d8609fc..faaca6a 100644 --- a/chrome/browser/resources/ssl/overridable_v2.html +++ b/chrome/browser/resources/ssl/interstitial_v2.html @@ -5,11 +5,11 @@ <meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width"> <title i18n-content="tabTitle"></title> - <link rel="stylesheet" href="overridable_v2.css"> + <link rel="stylesheet" href="interstitial_v2.css"> <script src="../../../../ui/webui/resources/js/util.js"></script> <script src="../../../../ui/webui/resources/js/load_time_data.js"></script> <script src="ssl_errors_common.js"></script> - <script src="overridable_v2.js"></script> + <script src="interstitial_v2.js"></script> </head> <body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <div class="interstitial-wrapper"> @@ -19,12 +19,12 @@ <p i18n-values=".innerHTML:primaryParagraph"></p> </div> <div class="nav-wrapper"> - <button i18n-content="safetyButtonText" id="safety-button"></button> + <button i18n-content="primaryButtonText" id="primary-button"></button> <a href="#" id="details-button" i18n-content="openDetails"></a> </div> <div id="details" class="hidden"> <p i18n-values=".innerHTML:explanationParagraph"></p> - <p i18n-values=".innerHTML:proceedParagraph"></p> + <p i18n-values=".innerHTML:finalParagraph"></p> </div> </div> </body> diff --git a/chrome/browser/resources/ssl/overridable_v2.js b/chrome/browser/resources/ssl/interstitial_v2.js index 22c0346..99344ee8 100644 --- a/chrome/browser/resources/ssl/overridable_v2.js +++ b/chrome/browser/resources/ssl/interstitial_v2.js @@ -5,15 +5,29 @@ var expandedDetails = false; function setupEvents() { - $('safety-button').addEventListener('click', function() { - sendCommand(CMD_DONT_PROCEED); - }); + var overridable = loadTimeData.getBoolean('overridable'); - $('proceed-link').addEventListener('click', function(event) { - sendCommand(CMD_PROCEED); - event.preventDefault(); // Don't let the fragment navigate. + $('primary-button').addEventListener('click', function() { + if (overridable) + sendCommand(CMD_DONT_PROCEED); + else + sendCommand(CMD_RELOAD); }); + if (overridable) { + $('proceed-link').addEventListener('click', function(event) { + sendCommand(CMD_PROCEED); + event.preventDefault(); + }); + } + + if (!overridable) { + $('help-link').addEventListener('click', function(event) { + sendCommand(CMD_HELP); + event.preventDefault(); + }); + } + $('details-button').addEventListener('click', function(event) { var hiddenDetails = $('details').classList.toggle('hidden'); $('details-button').innerText = hiddenDetails ? @@ -24,7 +38,7 @@ function setupEvents() { sendCommand(CMD_MORE); expandedDetails = true; } - event.preventDefault(); // Don't let the fragment navigate. + event.preventDefault(); }); } diff --git a/chrome/browser/resources/ssl/ssl_errors_common.js b/chrome/browser/resources/ssl/ssl_errors_common.js index 7e416df..190a8eb 100644 --- a/chrome/browser/resources/ssl/ssl_errors_common.js +++ b/chrome/browser/resources/ssl/ssl_errors_common.js @@ -7,6 +7,7 @@ var CMD_DONT_PROCEED = 0; var CMD_PROCEED = 1; var CMD_MORE = 2; var CMD_RELOAD = 3; +var CMD_HELP = 4; var keyPressState = 0; |