summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 01:09:10 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 01:09:10 +0000
commit434f98fe56928cc05a15d9ff9678d81b26812cf3 (patch)
treeb925fe2d3b78a897f1216ac15cd2112b08d65499 /webkit
parent5d066c8c93c0a272095228c0f4e0d135d4fa4417 (diff)
downloadchromium_src-434f98fe56928cc05a15d9ff9678d81b26812cf3.zip
chromium_src-434f98fe56928cc05a15d9ff9678d81b26812cf3.tar.gz
chromium_src-434f98fe56928cc05a15d9ff9678d81b26812cf3.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. Review URL: http://codereview.chromium.org/6328010 Patch from James Weatherall <wez@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-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();