summaryrefslogtreecommitdiffstats
path: root/content/browser/ssl
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 01:53:14 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 01:53:14 +0000
commit46d117e31ea6e7289cf795b992ac78b97b32de87 (patch)
tree4d02596713d15ad75cf9436c70bfa08db4b2bc3c /content/browser/ssl
parente40e529933926b565d793a01d8aff5b0cc4ad560 (diff)
downloadchromium_src-46d117e31ea6e7289cf795b992ac78b97b32de87.zip
chromium_src-46d117e31ea6e7289cf795b992ac78b97b32de87.tar.gz
chromium_src-46d117e31ea6e7289cf795b992ac78b97b32de87.tar.bz2
Revert 118001 - Revert 117968 - Rename is_hsts_host to fatal.
Per wtc: the old name was too specific, and became confusing because we now also have certificate errors that users cannot override, but for reasons other than (although still closely related to) HSTS. Failures were: http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%286%29/builds/7935 http://chromegw.corp.google.com/i/chromium/builders/XP%20Tests%20%28dbg%29%282%29/builds/13488 (view as text) WorkerFileSystemTest.FileWriterSyncTruncateExtend: [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(57)] Assume LayoutTests in E:\b\build\slave\XP_Tests__dbg__6_\build\src\chrome\test\data\layout_tests\LayoutTests [1132:3724:0117/155729:2434562:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\filesystem [1132:3724:0117/155730:2434765:INFO:ui_layout_test.cc(143)] Assume LayoutTests in fast\js .\test\ui\ui_test.cc(720): error: Failed Timeout reached in WaitUntilCookieNonEmpty Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html .\test\ui\ui_layout_test.cc(254): error: Value of: inner_text.c_str() Actual: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js " Expected: expected_result_value.c_str() Which is: "[Worker] Test using FileWriterSync.truncate to extend a file. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Starting worker: ../resources/file-writer-sync-truncate-extend.js PASS [Worker] Truncate extension verified. PASS successfullyParsed is true TEST COMPLETE " Google Test trace: .\test\ui\ui_layout_test.cc(174): file-writer-sync-truncate-extend.html BUG=109941 Review URL: https://chromiumcodereview.appspot.com/9188019 TBR=palmer@chromium.org TBR=apatrick@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118011 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/ssl')
-rw-r--r--content/browser/ssl/ssl_cert_error_handler.cc4
-rw-r--r--content/browser/ssl/ssl_cert_error_handler.h7
-rw-r--r--content/browser/ssl/ssl_manager.cc4
-rw-r--r--content/browser/ssl/ssl_manager.h2
-rw-r--r--content/browser/ssl/ssl_policy.cc2
5 files changed, 10 insertions, 9 deletions
diff --git a/content/browser/ssl/ssl_cert_error_handler.cc b/content/browser/ssl/ssl_cert_error_handler.cc
index 343a4dc..3e3414b 100644
--- a/content/browser/ssl/ssl_cert_error_handler.cc
+++ b/content/browser/ssl/ssl_cert_error_handler.cc
@@ -14,11 +14,11 @@ SSLCertErrorHandler::SSLCertErrorHandler(
net::URLRequest* request,
ResourceType::Type resource_type,
const net::SSLInfo& ssl_info,
- bool is_hsts_host)
+ bool fatal)
: SSLErrorHandler(rdh, request, resource_type),
ssl_info_(ssl_info),
cert_error_(net::MapCertStatusToNetError(ssl_info.cert_status)),
- is_hsts_host_(is_hsts_host) {
+ fatal_(fatal) {
DCHECK(request == resource_dispatcher_host_->GetURLRequest(request_id_));
}
diff --git a/content/browser/ssl/ssl_cert_error_handler.h b/content/browser/ssl/ssl_cert_error_handler.h
index aa25b92..e2ce1f0 100644
--- a/content/browser/ssl/ssl_cert_error_handler.h
+++ b/content/browser/ssl/ssl_cert_error_handler.h
@@ -21,14 +21,14 @@ class SSLCertErrorHandler : public SSLErrorHandler {
net::URLRequest* request,
ResourceType::Type resource_type,
const net::SSLInfo& ssl_info,
- bool is_hsts_host);
+ bool fatal);
virtual SSLCertErrorHandler* AsSSLCertErrorHandler() OVERRIDE;
// These accessors are available on either thread
const net::SSLInfo& ssl_info() const { return ssl_info_; }
int cert_error() const { return cert_error_; }
- bool is_hsts_host() const { return is_hsts_host_; }
+ bool fatal() const { return fatal_; }
protected:
// SSLErrorHandler methods
@@ -41,7 +41,8 @@ class SSLCertErrorHandler : public SSLErrorHandler {
// These read-only members may be accessed on any thread.
const net::SSLInfo ssl_info_;
const int cert_error_; // The error we represent.
- const bool is_hsts_host_; // true if the error is from an HSTS host.
+ const bool fatal_; // True if the error is from a host requiring
+ // certificate errors to be fatal.
DISALLOW_COPY_AND_ASSIGN(SSLCertErrorHandler);
};
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 597569c..e1dcc9d 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -34,7 +34,7 @@ using content::WebContents;
void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh,
net::URLRequest* request,
const net::SSLInfo& ssl_info,
- bool is_hsts_host) {
+ bool fatal) {
DVLOG(1) << "OnSSLCertificateError() cert_error: "
<< net::MapCertStatusToNetError(ssl_info.cert_status)
<< " url: " << request->url().spec()
@@ -52,7 +52,7 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh,
request,
info->resource_type(),
ssl_info,
- is_hsts_host)));
+ fatal)));
}
// static
diff --git a/content/browser/ssl/ssl_manager.h b/content/browser/ssl/ssl_manager.h
index 83deee8..e39b0a7 100644
--- a/content/browser/ssl/ssl_manager.h
+++ b/content/browser/ssl/ssl_manager.h
@@ -53,7 +53,7 @@ class SSLManager : public content::NotificationObserver {
static void OnSSLCertificateError(ResourceDispatcherHost* resource_dispatcher,
net::URLRequest* request,
const net::SSLInfo& ssl_info,
- bool is_hsts_host);
+ bool fatal);
// Called when SSL state for a host or tab changes. Broadcasts the
// SSL_INTERNAL_STATE_CHANGED notification.
diff --git a/content/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc
index 5202655..4b22e683 100644
--- a/content/browser/ssl/ssl_policy.cc
+++ b/content/browser/ssl/ssl_policy.cc
@@ -63,7 +63,7 @@ void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) {
case net::ERR_CERT_DATE_INVALID:
case net::ERR_CERT_AUTHORITY_INVALID:
case net::ERR_CERT_WEAK_SIGNATURE_ALGORITHM:
- OnCertErrorInternal(handler, !handler->is_hsts_host());
+ OnCertErrorInternal(handler, !handler->fatal());
break;
case net::ERR_CERT_NO_REVOCATION_MECHANISM:
// Ignore this error.