summaryrefslogtreecommitdiffstats
path: root/webkit/glue/weburlloader_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/weburlloader_impl.cc')
-rw-r--r--webkit/glue/weburlloader_impl.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index d4b5162..8904457 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -403,6 +403,12 @@ void WebURLLoaderImpl::Context::Start(
if (!request.allowStoredCredentials())
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
+ // TODO(jcampan): in the non out-of-process plugin case the request does not
+ // have a requestor_pid. Find a better place to set this.
+ int requestor_pid = request.requestorProcessID();
+ if (requestor_pid == 0)
+ requestor_pid = base::GetCurrentProcId();
+
HeaderFlattener flattener(load_flags);
request.visitHTTPHeaderFields(&flattener);
@@ -423,10 +429,7 @@ void WebURLLoaderImpl::Context::Start(
request_info.main_frame_origin = main_frame_origin;
request_info.headers = flattener.GetBuffer();
request_info.load_flags = load_flags;
- // requestor_pid only needs to be non-zero if the request originates outside
- // the render process, so we can use requestorProcessID even for requests
- // from in-process plugins.
- request_info.requestor_pid = request.requestorProcessID();
+ request_info.requestor_pid = requestor_pid;
request_info.request_type = FromTargetType(request.targetType());
request_info.appcache_host_id = request.appCacheHostID();
request_info.routing_id = request.requestorID();