summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 18:18:47 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 18:18:47 +0000
commit3b2a95c36e98d35b417466054349d2d5308c2af3 (patch)
tree519bc68dff46a9c68fd05067e208caf7b1741e99 /chrome/browser/task_manager.cc
parent200c17e7c73feb01fdb50ad92b8e4c2e301be57c (diff)
downloadchromium_src-3b2a95c36e98d35b417466054349d2d5308c2af3.zip
chromium_src-3b2a95c36e98d35b417466054349d2d5308c2af3.tar.gz
chromium_src-3b2a95c36e98d35b417466054349d2d5308c2af3.tar.bz2
Makes sure the network usage is also reported for non tabs (right now only the browser process).
BUG=1282443 TEST=Open the task manager, type in something in the location bar. The network usage for the browser process should show some activity. Review URL: http://codereview.chromium.org/7019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.cc')
-rw-r--r--chrome/browser/task_manager.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index c326cb9..bbe758e 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -610,18 +610,17 @@ void TaskManagerTableModel::OnJobRedirect(URLRequestJob* job,
}
void TaskManagerTableModel::OnBytesRead(URLRequestJob* job, int byte_count) {
- int render_process_host_id, routing_id;
- if (tab_util::GetTabContentsID(job->request(),
- &render_process_host_id, &routing_id)) {
- // This happens in the IO thread, post it to the UI thread.
- ui_loop_->PostTask(FROM_HERE,
- NewRunnableMethod(
- this,
- &TaskManagerTableModel::BytesRead,
- BytesReadParam(job->request()->origin_pid(),
- render_process_host_id, routing_id,
- byte_count)));
- }
+ int render_process_host_id = -1, routing_id = -1;
+ tab_util::GetTabContentsID(job->request(),
+ &render_process_host_id, &routing_id);
+ // This happens in the IO thread, post it to the UI thread.
+ ui_loop_->PostTask(FROM_HERE,
+ NewRunnableMethod(
+ this,
+ &TaskManagerTableModel::BytesRead,
+ BytesReadParam(job->request()->origin_pid(),
+ render_process_host_id, routing_id,
+ byte_count)));
}
bool TaskManagerTableModel::GetProcessMetricsForRows(