summaryrefslogtreecommitdiffstats
path: root/webkit/glue/weburlloader_impl.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 05:11:28 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 05:11:28 +0000
commitcdf682e4f0a828f76faf0d21c4eb263e51efee62 (patch)
tree05ca300563d5b6aaaa26c49bcca6ea5e117f2f9e /webkit/glue/weburlloader_impl.cc
parent83530b7c2914d367d2eeb299a7c452794d1761de (diff)
downloadchromium_src-cdf682e4f0a828f76faf0d21c4eb263e51efee62.zip
chromium_src-cdf682e4f0a828f76faf0d21c4eb263e51efee62.tar.gz
chromium_src-cdf682e4f0a828f76faf0d21c4eb263e51efee62.tar.bz2
Fix Task Manager to correctly display network usage of plug-in processes.
BUG=chromium-os:2954 TEST=Run Chrome and open Task Manager, then play a video in YouTube and check whether the Network usage is correctly reported against the plug-in. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73884 Review URL: http://codereview.chromium.org/6328010 Patch from James Weatherall <wez@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/weburlloader_impl.cc')
-rw-r--r--webkit/glue/weburlloader_impl.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 8904457..d4b5162 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -403,12 +403,6 @@ 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);
@@ -429,7 +423,10 @@ void WebURLLoaderImpl::Context::Start(
request_info.main_frame_origin = main_frame_origin;
request_info.headers = flattener.GetBuffer();
request_info.load_flags = load_flags;
- request_info.requestor_pid = requestor_pid;
+ // 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.request_type = FromTargetType(request.targetType());
request_info.appcache_host_id = request.appCacheHostID();
request_info.routing_id = request.requestorID();