Index: components/memory_coordinator/browser/memory_monitor.h |
diff --git a/components/memory_coordinator/browser/memory_monitor.h b/components/memory_coordinator/browser/memory_monitor.h |
index 8477cbc6abcef373d8d2eb16ee55e04cf5e79cb9..e71d310aee233c4664753e39af61c65144d7ff07 100644 |
--- a/components/memory_coordinator/browser/memory_monitor.h |
+++ b/components/memory_coordinator/browser/memory_monitor.h |
@@ -10,8 +10,27 @@ |
#include "base/macros.h" |
#include "components/memory_coordinator/common/memory_coordinator_export.h" |
+namespace base { |
+struct SystemMemoryInfoKB; |
+} |
+ |
namespace memory_coordinator { |
+// A class for fetching system information used by a memory monitor. This can |
chrisha
2016/09/07 21:25:09
I'd move this to below the MemoryMonitor definitio
bcwhite
2016/09/08 16:36:49
Done.
|
+// be subclassed for testing or if a particular MemoryMonitor implementation |
+// needs additional functionality. |
+class MEMORY_COORDINATOR_EXPORT MemoryMonitorDelegate { |
+ public: |
+ MemoryMonitorDelegate() {} |
+ virtual ~MemoryMonitorDelegate(); |
+ |
+ // Returns system memory information. |
+ virtual void GetSystemMemoryInfo(base::SystemMemoryInfoKB* mem_info); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MemoryMonitorDelegate); |
+}; |
+ |
// A simple class that monitors the amount of free memory available on a system. |
// This is an interface to facilitate dependency injection for testing. |
class MEMORY_COORDINATOR_EXPORT MemoryMonitor { |