Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: components/memory_pressure/memory_pressure_calculator.h

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MEMORY_PRESSURE_CALCULATOR_H_ 5 #ifndef COMPONENTS_MEMORY_PRESSURE_MEMORY_PRESSURE_CALCULATOR_H_
6 #define COMPONENTS_MEMORY_PRESSURE_MEMORY_PRESSURE_CALCULATOR_H_ 6 #define COMPONENTS_MEMORY_PRESSURE_MEMORY_PRESSURE_CALCULATOR_H_
7 7
8 #include "base/macros.h"
8 #include "components/memory_pressure/memory_pressure_listener.h" 9 #include "components/memory_pressure/memory_pressure_listener.h"
9 10
10 namespace memory_pressure { 11 namespace memory_pressure {
11 12
12 #if defined(MEMORY_PRESSURE_IS_POLLING) 13 #if defined(MEMORY_PRESSURE_IS_POLLING)
13 14
14 // Interface for a utility class that calculates memory pressure. Only used on 15 // Interface for a utility class that calculates memory pressure. Only used on
15 // platforms without native memory pressure signals. 16 // platforms without native memory pressure signals.
16 class MemoryPressureCalculator { 17 class MemoryPressureCalculator {
17 public: 18 public:
18 using MemoryPressureLevel = MemoryPressureListener::MemoryPressureLevel; 19 using MemoryPressureLevel = MemoryPressureListener::MemoryPressureLevel;
19 20
20 MemoryPressureCalculator() {} 21 MemoryPressureCalculator() {}
21 virtual ~MemoryPressureCalculator() {} 22 virtual ~MemoryPressureCalculator() {}
22 virtual MemoryPressureLevel CalculateCurrentPressureLevel() = 0; 23 virtual MemoryPressureLevel CalculateCurrentPressureLevel() = 0;
23 24
24 private: 25 private:
25 DISALLOW_COPY_AND_ASSIGN(MemoryPressureCalculator); 26 DISALLOW_COPY_AND_ASSIGN(MemoryPressureCalculator);
26 }; 27 };
27 28
28 #endif // defined(MEMORY_PRESSURE_IS_POLLING) 29 #endif // defined(MEMORY_PRESSURE_IS_POLLING)
29 30
30 } // namespace memory_pressure 31 } // namespace memory_pressure
31 32
32 #endif // COMPONENTS_MEMORY_PRESSURE_MEMORY_PRESSURE_CALCULATOR_H_ 33 #endif // COMPONENTS_MEMORY_PRESSURE_MEMORY_PRESSURE_CALCULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698