Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: chrome/browser/ssl/ssl_manager.cc

Issue 48038: SSL Fix: Step 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_manager.h ('k') | chrome/browser/ssl/ssl_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_manager.cc
===================================================================
--- chrome/browser/ssl/ssl_manager.cc (revision 11701)
+++ chrome/browser/ssl/ssl_manager.cc (working copy)
@@ -464,12 +464,25 @@
}
// 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) {
« no previous file with comments | « chrome/browser/ssl/ssl_manager.h ('k') | chrome/browser/ssl/ssl_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698