| 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_H_ | 5 #ifndef COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ |
| 6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ | 6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ |
| 7 | 7 |
| 8 #include "components/memory_pressure/memory_pressure_calculator.h" | 8 #include "components/memory_pressure/memory_pressure_calculator.h" |
| 9 | 9 |
| 10 #include "base/macros.h" |
| 10 #include "base/process/process_metrics.h" | 11 #include "base/process/process_metrics.h" |
| 12 #include "build/build_config.h" |
| 11 | 13 |
| 12 namespace memory_pressure { | 14 namespace memory_pressure { |
| 13 | 15 |
| 14 #if defined(MEMORY_PRESSURE_IS_POLLING) | 16 #if defined(MEMORY_PRESSURE_IS_POLLING) |
| 15 | 17 |
| 16 // OS-specific implementation of MemoryPressureCalculator. This is only defined | 18 // OS-specific implementation of MemoryPressureCalculator. This is only defined |
| 17 // and used on platforms that do not have native memory pressure signals | 19 // and used on platforms that do not have native memory pressure signals |
| 18 // (ChromeOS, Linux, Windows). OSes that do have native signals simply hook into | 20 // (ChromeOS, Linux, Windows). OSes that do have native signals simply hook into |
| 19 // the appropriate subsystem (Android, Mac OS X). | 21 // the appropriate subsystem (Android, Mac OS X). |
| 20 class DirectMemoryPressureCalculator : public MemoryPressureCalculator { | 22 class DirectMemoryPressureCalculator : public MemoryPressureCalculator { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #endif | 70 #endif |
| 69 | 71 |
| 70 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); | 72 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 #endif // defined(MEMORY_PRESSURE_IS_POLLING) | 75 #endif // defined(MEMORY_PRESSURE_IS_POLLING) |
| 74 | 76 |
| 75 } // namespace memory_pressure | 77 } // namespace memory_pressure |
| 76 | 78 |
| 77 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ | 79 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ |
| OLD | NEW |