summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r--chrome/browser/ssl/ssl_manager.cc8
-rw-r--r--chrome/browser/ssl/ssl_manager.h4
-rw-r--r--chrome/browser/ssl/ssl_policy.cc13
-rw-r--r--chrome/browser/ssl/ssl_policy.h5
-rw-r--r--chrome/browser/ssl/ssl_policy_backend.h2
5 files changed, 31 insertions, 1 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 73c3b02..36b4127 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -87,6 +87,14 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh,
&SSLCertErrorHandler::Dispatch));
}
+void SSLManager::DidDisplayInsecureContent() {
+ policy()->DidDisplayInsecureContent(controller_->GetActiveEntry());
+}
+
+void SSLManager::DidRunInsecureContent(const std::string& security_origin) {
+ policy()->DidRunInsecureContent(security_origin);
+}
+
// static
bool SSLManager::ShouldStartRequest(ResourceDispatcherHost* rdh,
URLRequest* request,
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index b287ea6..4e96ce8 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -77,6 +77,10 @@ class SSLManager : public NotificationObserver {
URLRequest* request,
MessageLoop* ui_loop);
+ // Mixed content entry points.
+ void DidDisplayInsecureContent();
+ void DidRunInsecureContent(const std::string& security_origin);
+
// Entry point for navigation. This function begins the process of updating
// the security UI when the main frame navigates to a new URL.
//
diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc
index a6ebfb8..bdb571b 100644
--- a/chrome/browser/ssl/ssl_policy.cc
+++ b/chrome/browser/ssl/ssl_policy.cc
@@ -133,6 +133,19 @@ void SSLPolicy::OnMixedContent(SSLMixedContentHandler* handler) {
AddMixedContentWarningToConsole(handler);
}
+void SSLPolicy::DidDisplayInsecureContent(NavigationEntry* entry) {
+ if (!entry)
+ return;
+
+ // TODO(abarth): We don't actually need to break the whole origin here,
+ // but we can handle that in a later patch.
+ AllowMixedContentForOrigin(entry->url().spec());
+}
+
+void SSLPolicy::DidRunInsecureContent(const std::string& security_origin) {
+ AllowMixedContentForOrigin(security_origin);
+}
+
void SSLPolicy::OnRequestStarted(SSLRequestInfo* info) {
if (net::IsCertStatusError(info->ssl_cert_status()))
UpdateStateForUnsafeContent(info);
diff --git a/chrome/browser/ssl/ssl_policy.h b/chrome/browser/ssl/ssl_policy.h
index 48a5f0d..df2e002 100644
--- a/chrome/browser/ssl/ssl_policy.h
+++ b/chrome/browser/ssl/ssl_policy.h
@@ -30,11 +30,16 @@ class SSLPolicy : public SSLBlockingPage::Delegate {
// An error occurred with the certificate in an SSL connection.
void OnCertError(SSLCertErrorHandler* handler);
+ // TODO(abarth) Remove this API once the new mixed content path is done.
+ //
// A request for a mixed-content resource was made. Note that the resource
// request was not started yet and the delegate is responsible for starting
// it.
void OnMixedContent(SSLMixedContentHandler* handler);
+ void DidDisplayInsecureContent(NavigationEntry* entry);
+ void DidRunInsecureContent(const std::string& security_origin);
+
// We have started a resource request with the given info.
void OnRequestStarted(SSLRequestInfo* info);
diff --git a/chrome/browser/ssl/ssl_policy_backend.h b/chrome/browser/ssl/ssl_policy_backend.h
index f8a829c..935ad9e 100644
--- a/chrome/browser/ssl/ssl_policy_backend.h
+++ b/chrome/browser/ssl/ssl_policy_backend.h
@@ -45,7 +45,7 @@ class SSLPolicyBackend {
//
// It will return true if the navigation entry was updated or false if
// nothing changed. The caller is responsible for broadcasting
- // NOTIFY_SSY_STATE_CHANGED if it returns true.
+ // NOTIFY_SSL_STATE_CHANGED if it returns true.
bool SetMaxSecurityStyle(SecurityStyle style);
// Logs a message to the console of the page.