| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/memory/memory_monitor.h" | 5 #include "content/browser/memory/memory_monitor.h" |
| 6 | 6 |
| 7 #include "base/process/process_metrics.h" | 7 #include "base/process/process_metrics.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| 11 // static | 11 // static |
| 12 MemoryMonitorDelegate* MemoryMonitorDelegate::GetInstance() { | 12 MemoryMonitorDelegate* MemoryMonitorDelegate::GetInstance() { |
| 13 return base::Singleton< | 13 return base::Singleton< |
| 14 MemoryMonitorDelegate, | 14 MemoryMonitorDelegate, |
| 15 base::LeakySingletonTraits<MemoryMonitorDelegate>>::get(); | 15 base::LeakySingletonTraits<MemoryMonitorDelegate>>::get(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 MemoryMonitorDelegate::~MemoryMonitorDelegate() {} | 18 MemoryMonitorDelegate::~MemoryMonitorDelegate() {} |
| 19 | 19 |
| 20 void MemoryMonitorDelegate::GetSystemMemoryInfo( | 20 void MemoryMonitorDelegate::GetSystemMemoryInfo( |
| 21 base::SystemMemoryInfoKB* mem_info) { | 21 base::SystemMemoryInfoKB* mem_info) { |
| 22 base::GetSystemMemoryInfo(mem_info); | 22 base::GetSystemMemoryInfo(mem_info); |
| 23 } | 23 } |
| 24 | 24 |
| 25 #if defined(OS_MACOSX) |
| 26 // TODO(bashi,bcwhite): Remove when memory monitor for mac is available. |
| 27 std::unique_ptr<MemoryMonitor> CreateMemoryMonitor() { |
| 28 NOTREACHED(); |
| 29 return std::unique_ptr<MemoryMonitor>(); |
| 30 } |
| 31 #endif |
| 32 |
| 25 } // namespace content | 33 } // namespace content |
| OLD | NEW |