Index: components/memory_coordinator/browser/memory_monitor_win.h |
diff --git a/components/memory_coordinator/browser/memory_monitor_win.h b/components/memory_coordinator/browser/memory_monitor_win.h |
deleted file mode 100644 |
index a7ddaa17569d5ee0af30c09d3f1426c82539121b..0000000000000000000000000000000000000000 |
--- a/components/memory_coordinator/browser/memory_monitor_win.h |
+++ /dev/null |
@@ -1,65 +0,0 @@ |
-// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
-// 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_ |
- |
-#include "components/memory_coordinator/browser/memory_monitor.h" |
-#include "components/memory_coordinator/common/memory_coordinator_export.h" |
- |
-namespace base { |
-struct SystemMemoryInfoKB; |
-} // namespace base |
- |
-namespace memory_coordinator { |
- |
-// 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 { |
- public: |
- // Default constants governing the amount of free memory that the memory |
- // manager attempts to maintain. |
- static const int kLargeMemoryThresholdMB; |
- static const int kSmallMemoryTargetFreeMB; |
- static const int kLargeMemoryTargetFreeMB; |
- |
- MemoryMonitorWin(MemoryMonitorDelegate* delegate, int target_free_mb); |
- ~MemoryMonitorWin() override {} |
- |
- // MemoryMonitor: |
- int GetFreeMemoryUntilCriticalMB() override; |
- |
- // Returns the current free memory target. |
- int target_free_mb() const { return target_free_mb_; } |
- |
- // Factory function. Automatically sizes |target_free_mb| based on the |
- // system. |
- static std::unique_ptr<MemoryMonitorWin> Create( |
- MemoryMonitorDelegate* delegate); |
- |
- protected: |
- // Determines if the system is in large memory mode. Exposed so that this |
- // function can be tested. |
- static bool IsLargeMemory(MemoryMonitorDelegate* delegate); |
- |
- // Determines the default target free MB value. Exposed so that this function |
- // can be tested. |
- static int GetTargetFreeMB(MemoryMonitorDelegate* delegate); |
- |
- private: |
- // The delegate to be used for retrieving system memory information. Used as a |
- // testing seam. |
- MemoryMonitorDelegate* delegate_; |
- |
- // The amount of memory that the memory manager (MM) attempts to keep in a |
- // free state. When less than this amount of physical memory is free, it is |
- // assumed that the MM will start paging things out. |
- int target_free_mb_; |
-}; |
- |
-} // namespace memory_coordinator |
- |
-#endif // COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_MONITOR_WIN_H_ |