summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 22:48:19 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 22:48:19 +0000
commit14620b39945285390b90a0d84cae39c677ce18aa (patch)
tree93b5966947f6c9e04632decdd88d8d480c36b6bd /chrome/browser/task_manager.cc
parenta8c8b34888746435dfe73ff529aaf3b1d9ace3e3 (diff)
downloadchromium_src-14620b39945285390b90a0d84cae39c677ce18aa.zip
chromium_src-14620b39945285390b90a0d84cae39c677ce18aa.tar.gz
chromium_src-14620b39945285390b90a0d84cae39c677ce18aa.tar.bz2
Fix cpu/memory measurements on OS X.
Right now, this only works for the current process; support for child processes will be added in a later CL. BUG=13156,25454 TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes. Review URL: http://codereview.chromium.org/500118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager.cc')
-rw-r--r--chrome/browser/task_manager.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/task_manager.cc b/chrome/browser/task_manager.cc
index 43952a5..edd7b37 100644
--- a/chrome/browser/task_manager.cc
+++ b/chrome/browser/task_manager.cc
@@ -533,7 +533,14 @@ void TaskManagerModel::AddResource(TaskManager::Resource* resource) {
// Create the ProcessMetrics for this process if needed (not in map).
if (metrics_map_.find(process) == metrics_map_.end()) {
base::ProcessMetrics* pm =
+#if !defined(OS_MACOSX)
base::ProcessMetrics::CreateProcessMetrics(process);
+#else
+ // TODO(thakis): Write a port provider that knows the task ports of
+ // child processes.
+ base::ProcessMetrics::CreateProcessMetrics(process, NULL);
+#endif
+
metrics_map_[process] = pm;
}
@@ -770,12 +777,12 @@ void TaskManagerModel::OnJobRemoved(URLRequestJob* job) {
}
void TaskManagerModel::OnJobDone(URLRequestJob* job,
- const URLRequestStatus& status) {
+ const URLRequestStatus& status) {
}
void TaskManagerModel::OnJobRedirect(URLRequestJob* job,
- const GURL& location,
- int status_code) {
+ const GURL& location,
+ int status_code) {
}
void TaskManagerModel::OnBytesRead(URLRequestJob* job, int byte_count) {