Chromium Code Reviews| Index: content/child/blink_platform_impl.cc |
| diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc |
| index 7f99386b21206522a64ba9688703b37b50e1aa79..b7de27c26855fe1d47d6e8a97fe022ee3ed22d26 100644 |
| --- a/content/child/blink_platform_impl.cc |
| +++ b/content/child/blink_platform_impl.cc |
| @@ -1215,20 +1215,6 @@ blink::WebString BlinkPlatformImpl::signedPublicKeyAndChallengeString( |
| return blink::WebString(""); |
| } |
| -static scoped_ptr<base::ProcessMetrics> CurrentProcessMetrics() { |
| - using base::ProcessMetrics; |
| -#if defined(OS_MACOSX) |
| - return scoped_ptr<ProcessMetrics>( |
| - // The default port provider is sufficient to get data for the current |
| - // process. |
| - ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle(), |
| - NULL)); |
| -#else |
| - return scoped_ptr<ProcessMetrics>( |
| - ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle())); |
| -#endif |
| -} |
| - |
| static size_t getMemoryUsageMB(bool bypass_cache) { |
| size_t current_mem_usage = 0; |
| MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::GetInstance(); |
| @@ -1268,7 +1254,10 @@ size_t BlinkPlatformImpl::numberOfProcessors() { |
| bool BlinkPlatformImpl::processMemorySizesInBytes( |
| size_t* private_bytes, |
| size_t* shared_bytes) { |
| - return CurrentProcessMetrics()->GetMemoryBytes(private_bytes, shared_bytes); |
| + using base::ProcessMetrics; |
|
Lei Zhang
2015/11/10 22:02:29
meh, you can omit this line and add base:: below.
fdoray
2015/11/11 22:04:38
Done.
|
| + scoped_ptr<CurrentProcessMetrics> current_process_metrics( |
| + ProcessMetrics::CreateCurrentProcessMetrics()); |
| + return current_process_metrics->GetMemoryBytes(private_bytes, shared_bytes); |
| } |
| bool BlinkPlatformImpl::memoryAllocatorWasteInBytes(size_t* size) { |