summaryrefslogtreecommitdiffstats
path: root/chrome/browser/security
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 19:17:58 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 19:17:58 +0000
commitfaf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad (patch)
tree9a9ab40c4ddd6a08b717bd48b93342faf66dd92f /chrome/browser/security
parent7ceeba70872aab6ac66a1043c9f1587b12fc6710 (diff)
downloadchromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.zip
chromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.tar.gz
chromium_src-faf9cd6e0a9a3b8d6466c547cb9314c6af8dcdad.tar.bz2
Use the same code to handle both overridable and fatal
certificate errors. The only difference is that the SSL interstial page for fatal certificate errors has only one button ("Back"). Copy ssl_roadpage.html to ssl_error.html, remove the "proceed" button, and rename the "exit" button to "back". The local variable |html| in SSLBlockingPage::GetHTMLContents should not be declared as static. Remove SSLPolicy::ShowErrorPage and RenderViewHost::LoadAlternateHTMLString. R=abarth,jcivelli BUG=41360 TEST=Type https://test-ssev.verisign.com:2443/test-SSEV-revoked-verisign.html in the location bar and hit Enter. The location bar should display that URL with a broken certificate error status, and the Back button on the SSL interstitial page should work. Review URL: http://codereview.chromium.org/1613016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/security')
-rw-r--r--chrome/browser/security/resources/ssl_error.html45
1 files changed, 26 insertions, 19 deletions
diff --git a/chrome/browser/security/resources/ssl_error.html b/chrome/browser/security/resources/ssl_error.html
index c7480c2..6326156 100644
--- a/chrome/browser/security/resources/ssl_error.html
+++ b/chrome/browser/security/resources/ssl_error.html
@@ -46,45 +46,52 @@ html[dir='rtl'] .box {
.main {
margin:0px 80px 0px;
}
+
.submission {
- margin:5px 5px 15px 0px;
+ margin:15px 5px 15px 0px;
padding:0px;
}
input {
margin:0px;
}
-
+.helpbutton {
+ float:right;
+}
.example {
margin:30px 80px 0px;
border-top:1px solid #ccc;
- padding-top:6pt;
+ padding-top:6px;
}
.moreinfotitle {
margin-left:5px;
margin-right:5px;
}
</style>
+
<script>
+ function $(o) {return document.getElementById(o);}
+
+ function sendCommand(cmd) {
+ window.domAutomationController.setAutomationId(1);
+ window.domAutomationController.send(cmd);
+ }
+
function toggleMoreInfo(collapse) {
- var div_to_hide;
- var div_to_show;
if (collapse) {
- div_to_hide = document.getElementById("more_info_long");
- div_to_show = document.getElementById("more_info_short");
+ $("more_info_long").style.display = "none";
+ $("more_info_short").style.display = "block";
} else {
- div_to_hide = document.getElementById("more_info_short");
- div_to_show = document.getElementById("more_info_long");
+ $("more_info_long").style.display = "block";
+ $("more_info_short").style.display = "none";
}
- div_to_hide.style.display = "none";
- div_to_show.style.display = "block";
}
function setDirectionSensitiveImages() {
if (document.documentElement.dir == 'rtl') {
- document.getElementById("twisty_closed_rtl").style.display = "inline";
- } else {
- document.getElementById("twisty_closed").style.display = "inline";
- }
- }
+ $("twisty_closed_rtl").style.display = "inline";
+ } else {
+ $("twisty_closed").style.display = "inline";
+ }
+ }
</script>
</head>
<body oncontextmenu="return false;">
@@ -92,7 +99,7 @@ input {
document.addEventListener('DOMContentLoaded', setDirectionSensitiveImages);
</script>
<div class="background"><img src="ssl_roadblock_background.png" width="100%" height="100%" alt="background" onmousedown="return false;"></div>
-<table width="100%" cellspacing="0" cellpadding="0">
+<table width="100%" cellspacing="0" cellpadding="0">
<td class="cell" valign="middle" align="center">
<div class="box">
<div class="icon"><img src="ssl_roadblock_icon.png" alt="SSL Error Icon" onmousedown="return false;"></div>
@@ -100,7 +107,7 @@ document.addEventListener('DOMContentLoaded', setDirectionSensitiveImages);
<div class="main" i18n-values=".innerHTML:description"></div>
<div class="main">
<form class="submission">
- <input type="button" i18n-values="value:back" name="back" onClick="history.back()">
+ <input type="button" i18n-values="value:back" name="back" onClick="sendCommand(0);">
</form>
</div>
<div class="example" id="more_info_short">
@@ -113,7 +120,7 @@ document.addEventListener('DOMContentLoaded', setDirectionSensitiveImages);
// the inlined version will just end up with that path string rather
// than the inlined image.
-->
- <a href="#" onclick="toggleMoreInfo(false); return false;" onmousedown="return false;"><img id="twisty_closed" src="twisty_closed.png" border="0" style="display:none"><img id="twisty_closed_rtl" src="twisty_closed_rtl.png" border="0" style="display:none"><span i18n-content="moreInfoTitle" class="moreinfotitle"></span></a>
+ <a href="#" onclick="toggleMoreInfo(false); return false;" onmousedown="return false;"><img id="twisty_closed" src="twisty_closed.png" border="0" style="display:none"><img id="twisty_closed_rtl" src="twisty_closed_rtl.png" border="0" style="display:none"><span i18n-content="moreInfoTitle" class="moreinfotitle"></span></a>
</div>
<div class="example" id="more_info_long" style="display:none;">
<a href="#" onclick="toggleMoreInfo(true); return false;" onmousedown="return false;"><img src="twisty_open.png" border="0"><span i18n-content="moreInfoTitle" class="moreinfotitle"></span></a>