Index: content/browser/memory/memory_monitor_win.h |
diff --git a/components/memory_coordinator/browser/memory_monitor_win.h b/content/browser/memory/memory_monitor_win.h |
similarity index 72% |
rename from components/memory_coordinator/browser/memory_monitor_win.h |
rename to content/browser/memory/memory_monitor_win.h |
index a7ddaa17569d5ee0af30c09d3f1426c82539121b..bb2d1212fa5f01a1c348ed973a42420d0e2e3c06 100644 |
--- a/components/memory_coordinator/browser/memory_monitor_win.h |
+++ b/content/browser/memory/memory_monitor_win.h |
@@ -2,23 +2,22 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_MONITOR_WIN_H_ |
-#define COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_MONITOR_WIN_H_ |
+#ifndef CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_WIN_H_ |
+#define CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_WIN_H_ |
-#include "components/memory_coordinator/browser/memory_monitor.h" |
-#include "components/memory_coordinator/common/memory_coordinator_export.h" |
+#include "content/browser/memory/memory_monitor.h" |
namespace base { |
struct SystemMemoryInfoKB; |
} // namespace base |
-namespace memory_coordinator { |
+namespace content { |
// A memory monitor for the Windows platform. After much experimentation this |
// class uses a very simple heuristic to anticipate paging (critical memory |
// pressure). When the amount of memory available dips below a provided |
// threshold, it is assumed that paging is inevitable. |
-class MEMORY_COORDINATOR_EXPORT MemoryMonitorWin : public MemoryMonitor { |
+class CONTENT_EXPORT MemoryMonitorWin : public MemoryMonitor { |
public: |
// Default constants governing the amount of free memory that the memory |
// manager attempts to maintain. |
@@ -60,6 +59,20 @@ class MEMORY_COORDINATOR_EXPORT MemoryMonitorWin : public MemoryMonitor { |
int target_free_mb_; |
}; |
-} // namespace memory_coordinator |
+// A delegate that wraps functions used by MemoryMonitorWin. Used as a testing |
+// seam. |
+class CONTENT_EXPORT MemoryMonitorWinDelegate { |
+ public: |
+ MemoryMonitorWinDelegate() {} |
+ virtual ~MemoryMonitorWinDelegate() {} |
+ |
+ // Returns system memory information. |
+ virtual void GetSystemMemoryInfo(base::SystemMemoryInfoKB* mem_info) = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MemoryMonitorWinDelegate); |
+}; |
+ |
+} // namespace content |
-#endif // COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_MONITOR_WIN_H_ |
+#endif // CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_WIN_H_ |