summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager/task_manager.cc
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 01:16:55 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-05 01:16:55 +0000
commit717f6fc98c976657680fc8f0e6e3ef79cce17a79 (patch)
tree6e39a852e93ad4547f2d8c3be6323f84f37d357a /chrome/browser/task_manager/task_manager.cc
parent0c61abfa12624ed5359acd2957b9bed3a839b44d (diff)
downloadchromium_src-717f6fc98c976657680fc8f0e6e3ef79cce17a79.zip
chromium_src-717f6fc98c976657680fc8f0e6e3ef79cce17a79.tar.gz
chromium_src-717f6fc98c976657680fc8f0e6e3ef79cce17a79.tar.bz2
This reverts commit r73836.
TBR=wez git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager/task_manager.cc')
-rw-r--r--chrome/browser/task_manager/task_manager.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/task_manager/task_manager.cc b/chrome/browser/task_manager/task_manager.cc
index 1f113b7..4c3634f 100644
--- a/chrome/browser/task_manager/task_manager.cc
+++ b/chrome/browser/task_manager/task_manager.cc
@@ -839,7 +839,7 @@ void TaskManagerModel::BytesRead(BytesReadParam param) {
TaskManager::Resource* resource = NULL;
for (ResourceProviderList::iterator iter = providers_.begin();
iter != providers_.end(); ++iter) {
- resource = (*iter)->GetResource(param.origin_pid,
+ resource = (*iter)->GetResource(param.origin_child_id,
param.render_process_host_child_id,
param.routing_id);
if (resource)
@@ -851,8 +851,9 @@ void TaskManagerModel::BytesRead(BytesReadParam param) {
// tab that started a download was closed, or the request may have had
// no originating resource associated with it in the first place.
// We attribute orphaned/unaccounted activity to the Browser process.
- CHECK(param.origin_pid || (param.render_process_host_child_id != -1));
- param.origin_pid = 0;
+ int browser_pid = base::GetCurrentProcId();
+ CHECK(param.origin_child_id != browser_pid);
+ param.origin_child_id = browser_pid;
param.render_process_host_child_id = param.routing_id = -1;
BytesRead(param);
return;
@@ -903,18 +904,15 @@ void TaskManagerModel::OnBytesRead(net::URLRequestJob* job, const char* buf,
&render_process_host_child_id,
&routing_id);
- // Get the origin PID of the request's originator. This will only be set for
- // plugins - for renderer or browser initiated requests it will be zero.
- int origin_pid =
- chrome_browser_net::GetOriginPIDForRequest(job->request());
-
// This happens in the IO thread, post it to the UI thread.
+ int origin_child_id =
+ chrome_browser_net::GetOriginProcessUniqueIDForRequest(job->request());
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableMethod(
this,
&TaskManagerModel::BytesRead,
- BytesReadParam(origin_pid,
+ BytesReadParam(origin_child_id,
render_process_host_child_id,
routing_id, byte_count)));
}