| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ | 5 #ifndef COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ |
| 6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ | 6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ |
| 7 | 7 |
| 8 #include "components/memory_pressure/memory_pressure_calculator.h" | |
| 9 | |
| 10 #include "base/macros.h" | 8 #include "base/macros.h" |
| 11 #include "base/process/process_metrics.h" | 9 #include "base/process/process_metrics.h" |
| 12 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "components/memory_pressure/memory_pressure_calculator.h" |
| 13 | 12 |
| 14 namespace memory_pressure { | 13 namespace memory_pressure { |
| 15 | 14 |
| 16 #if defined(MEMORY_PRESSURE_IS_POLLING) | 15 #if defined(MEMORY_PRESSURE_IS_POLLING) |
| 17 | 16 |
| 18 // OS-specific implementation of MemoryPressureCalculator. This is only defined | 17 // OS-specific implementation of MemoryPressureCalculator. This is only defined |
| 19 // and used on platforms that do not have native memory pressure signals | 18 // and used on platforms that do not have native memory pressure signals |
| 20 // (ChromeOS, Linux, Windows). OSes that do have native signals simply hook into | 19 // (ChromeOS, Linux, Windows). OSes that do have native signals simply hook into |
| 21 // the appropriate subsystem (Android, Mac OS X). | 20 // the appropriate subsystem (Android, Mac OS X). |
| 22 class DirectMemoryPressureCalculator : public MemoryPressureCalculator { | 21 class DirectMemoryPressureCalculator : public MemoryPressureCalculator { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 int critical_threshold_mb_; | 63 int critical_threshold_mb_; |
| 65 | 64 |
| 66 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); | 65 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 #endif // defined(MEMORY_PRESSURE_IS_POLLING) | 68 #endif // defined(MEMORY_PRESSURE_IS_POLLING) |
| 70 | 69 |
| 71 } // namespace memory_pressure | 70 } // namespace memory_pressure |
| 72 | 71 |
| 73 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ | 72 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_WIN_H_ |
| OLD | NEW |