summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webkitclient_impl.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-19 04:50:04 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-19 04:50:04 +0000
commit3740cb9b54f6a5d28c3501b650b7c179101568eb (patch)
tree848c46b9b75018e0fc60edf715e068bf5cc87c24 /webkit/glue/webkitclient_impl.cc
parent0ec9512a65f8d7f15dbddd902363994660d85ffb (diff)
downloadchromium_src-3740cb9b54f6a5d28c3501b650b7c179101568eb.zip
chromium_src-3740cb9b54f6a5d28c3501b650b7c179101568eb.tar.gz
chromium_src-3740cb9b54f6a5d28c3501b650b7c179101568eb.tar.bz2
Revert 35025 - Revert 34994, maybe it regressed startup perf 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 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/504068 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/505056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkitclient_impl.cc')
-rw-r--r--webkit/glue/webkitclient_impl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 340a28c..c7673cf 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -318,7 +318,14 @@ WebKit::WebString WebKitClientImpl::signedPublicKeyAndChallengeString(
size_t WebKitClientImpl::memoryUsageMB() {
using base::ProcessMetrics;
static ProcessMetrics* process_metrics =
+#if !defined(OS_MACOSX)
ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle());
+#else
+ // The default port provider is sufficient to get data for the current
+ // process.
+ ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle(),
+ NULL);
+#endif
DCHECK(process_metrics);
return process_metrics->GetPagefileUsage() >> 20;
}