summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authorpalmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 22:00:08 +0000
committerpalmer@chromium.org <palmer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 22:00:08 +0000
commite3cf2313e15f3e8660e1d2948aad4670f040fe91 (patch)
treec200f81aeb4c894ee206ed007bf9a66f4ae87ded /content/browser
parent5922cb23df5b69ece5fb4a022521a591cad21cf4 (diff)
downloadchromium_src-e3cf2313e15f3e8660e1d2948aad4670f040fe91.zip
chromium_src-e3cf2313e15f3e8660e1d2948aad4670f040fe91.tar.gz
chromium_src-e3cf2313e15f3e8660e1d2948aad4670f040fe91.tar.bz2
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. BUG=109941 Review URL: https://chromiumcodereview.appspot.com/9188019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.h2
-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
6 files changed, 11 insertions, 10 deletions
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h
index 56bd015..e1d642d 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.h
+++ b/content/browser/renderer_host/resource_dispatcher_host.h
@@ -188,7 +188,7 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate {
net::SSLCertRequestInfo* cert_request_info) OVERRIDE;
virtual void OnSSLCertificateError(net::URLRequest* request,
const net::SSLInfo& ssl_info,
- bool is_hsts_host) OVERRIDE;
+ bool fatal) OVERRIDE;
virtual bool CanGetCookies(const net::URLRequest* request,
const net::CookieList& cookie_list) const OVERRIDE;
virtual bool CanSetCookie(const net::URLRequest* request,
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.