summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl/ssl_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ssl/ssl_manager.cc')
-rw-r--r--chrome/browser/ssl/ssl_manager.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 2d6e8d2..42fc860 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -463,12 +463,25 @@ void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh,
}
// static
-void SSLManager::OnMixedContentRequest(ResourceDispatcherHost* rdh,
- URLRequest* request,
- MessageLoop* ui_loop) {
+bool SSLManager::ShouldStartRequest(ResourceDispatcherHost* rdh,
+ URLRequest* request,
+ MessageLoop* ui_loop) {
+ ResourceDispatcherHost::ExtraRequestInfo* info =
+ ResourceDispatcherHost::ExtraInfoForRequest(request);
+ DCHECK(info);
+
+ // We cheat here and talk to the SSLPolicy on the IO thread because we need
+ // to respond synchronously to avoid delaying all network requests...
+ if (!SSLPolicy::IsMixedContent(request->url(),
+ info->resource_type,
+ info->main_frame_origin))
+ return true;
+
+
ui_loop->PostTask(FROM_HERE,
NewRunnableMethod(new MixedContentHandler(rdh, request, ui_loop),
&MixedContentHandler::Dispatch));
+ return false;
}
void SSLManager::OnCertError(CertError* error) {