Index: webkit/glue/resource_handle_impl.cc |
=================================================================== |
--- webkit/glue/resource_handle_impl.cc (revision 11712) |
+++ webkit/glue/resource_handle_impl.cc (working copy) |
@@ -28,9 +28,7 @@ |
MSVC_PUSH_WARNING_LEVEL(0); |
#include "CString.h" |
-#include "Console.h" |
#include "DocLoader.h" |
-#include "DOMWindow.h" |
#include "FormData.h" |
#include "FrameLoader.h" |
#include "Page.h" |
@@ -52,7 +50,6 @@ |
#include "webkit/glue/glue_util.h" |
#include "webkit/glue/multipart_response_delegate.h" |
#include "webkit/glue/resource_loader_bridge.h" |
-#include "webkit/glue/webframe_impl.h" |
#include "net/base/data_url.h" |
#include "net/base/net_errors.h" |
#include "net/base/net_util.h" |
@@ -312,10 +309,6 @@ |
ResourceLoaderBridge::SyncLoadResponse* sync_load_response) { |
DCHECK(!bridge_.get()); |
- // The WebFrame is the Frame's FrameWinClient |
- WebFrameImpl* webframe = |
- request_.frame() ? WebFrameImpl::FromFrame(request_.frame()) : NULL; |
- |
CString method = request_.httpMethod().latin1(); |
GURL referrer(webkit_glue::StringToStdString(request_.httpReferrer())); |
@@ -333,17 +326,6 @@ |
client_ = feed_client_proxy_.get(); |
} |
- // Inherit the policy URL from the request's frame. However, if the request |
- // is for a main frame, the current document's policyBaseURL is the old |
- // document, so we leave policyURL empty to indicate that the request is a |
- // first-party request. |
- GURL policy_url; |
- if (request_.targetType() != ResourceRequest::TargetIsMainFrame && |
- request_.frame() && request_.frame()->document()) { |
- policy_url = GURL(webkit_glue::StringToStdString( |
- request_.frame()->document()->policyBaseURL())); |
- } |
- |
switch (request_.cachePolicy()) { |
case ReloadIgnoringCacheData: |
// Required by LayoutTests/http/tests/misc/refresh-headers.php |
@@ -394,27 +376,16 @@ |
(*it).second == "max-age=0") |
continue; |
- // WinInet dies if blank headers are set. TODO(darin): Is this still an |
- // issue now that we are using WinHTTP? |
- if ((*it).first.isEmpty()) { |
- webframe->frame()->domWindow()->console()->addMessage( |
- JSMessageSource, |
- ErrorMessageLevel, |
- "Refused to set blank header", |
- 1, |
- String()); |
- continue; |
- } |
if (!headerBuf.isEmpty()) |
headerBuf.append(crlf); |
headerBuf.append((*it).first + sep + (*it).second); |
} |
// TODO(jcampan): in the non out-of-process plugin case the request does not |
- // have a origin_pid. Find a better place to set this. |
- int origin_pid = request_.originPid(); |
- if (origin_pid == 0) |
- origin_pid = base::GetCurrentProcId(); |
+ // have a requestor_pid. Find a better place to set this. |
+ int requestor_pid = request_.requestorProcessID(); |
+ if (requestor_pid == 0) |
+ requestor_pid = base::GetCurrentProcId(); |
bool mixed_content = |
webkit_glue::KURLToGURL(request_.mainDocumentURL()).SchemeIsSecure() && |
@@ -444,16 +415,16 @@ |
// TODO(brettw) this should take parameter encoding into account when |
// creating the GURLs. |
bridge_.reset(ResourceLoaderBridge::Create( |
- webframe, |
webkit_glue::CStringToStdString(method), |
url, |
- policy_url, |
+ webkit_glue::KURLToGURL(request_.policyURL()), |
referrer, |
webkit_glue::CStringToStdString(headerBuf.latin1()), |
load_flags_, |
- origin_pid, |
+ requestor_pid, |
FromTargetType(request_.targetType()), |
- mixed_content)); |
+ mixed_content, |
+ request_.requestorID())); |
if (!bridge_.get()) |
return false; |