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

Unified Diff: webkit/glue/resource_handle_impl.cc

Issue 46094: Fix our handling of mixed SSL / non-SSL content.... (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
Index: webkit/glue/resource_handle_impl.cc
===================================================================
--- webkit/glue/resource_handle_impl.cc (revision 11701)
+++ webkit/glue/resource_handle_impl.cc (working copy)
@@ -416,10 +416,6 @@
if (origin_pid == 0)
origin_pid = base::GetCurrentProcId();
- bool mixed_content =
- webkit_glue::KURLToGURL(request_.mainDocumentURL()).SchemeIsSecure() &&
- !url.SchemeIsSecure();
-
if (url.SchemeIs("data")) {
if (sync_load_response) {
// This is a sync load. Do the work now.
@@ -439,6 +435,11 @@
return true;
}
+ Frame* frame = request_.frame();
+ std::string frame_origin = webkit_glue::FrameToOrigin(frame);
+ std::string main_frame_origin =
+ webkit_glue::FrameToOrigin(frame ? frame->tree()->top() : NULL);
+
// TODO(darin): is latin1 really correct here? It is if the strings are
// already ASCII (i.e., if they are already escaped properly).
// TODO(brettw) this should take parameter encoding into account when
@@ -449,11 +450,12 @@
url,
policy_url,
referrer,
+ frame_origin,
+ main_frame_origin,
webkit_glue::CStringToStdString(headerBuf.latin1()),
load_flags_,
origin_pid,
- FromTargetType(request_.targetType()),
- mixed_content));
+ FromTargetType(request_.targetType())));
if (!bridge_.get())
return false;

Powered by Google App Engine
This is Rietveld 408576698