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

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

Issue 1312893002: direct_memory_pressure_calculator.h: remove 'virtual' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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/process/process_metrics.h" 10 #include "base/process/process_metrics.h"
(...skipping 20 matching lines...) Expand all
31 31
32 // Default constructor. Will choose thresholds automatically based on the 32 // Default constructor. Will choose thresholds automatically based on the
33 // actual amount of system memory installed. 33 // actual amount of system memory installed.
34 DirectMemoryPressureCalculator(); 34 DirectMemoryPressureCalculator();
35 35
36 // Constructor with explicit memory thresholds. These represent the amount of 36 // Constructor with explicit memory thresholds. These represent the amount of
37 // free memory below which the applicable memory pressure state applies. 37 // free memory below which the applicable memory pressure state applies.
38 DirectMemoryPressureCalculator(int moderate_threshold_mb, 38 DirectMemoryPressureCalculator(int moderate_threshold_mb,
39 int critical_threshold_mb); 39 int critical_threshold_mb);
40 40
41 virtual ~DirectMemoryPressureCalculator() override {} 41 ~DirectMemoryPressureCalculator() override {}
42 42
43 // Calculates the current pressure level. 43 // Calculates the current pressure level.
44 MemoryPressureLevel CalculateCurrentPressureLevel() override; 44 MemoryPressureLevel CalculateCurrentPressureLevel() override;
45 45
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 int moderate_threshold_mb() const { return moderate_threshold_mb_; } 47 int moderate_threshold_mb() const { return moderate_threshold_mb_; }
48 int critical_threshold_mb() const { return critical_threshold_mb_; } 48 int critical_threshold_mb() const { return critical_threshold_mb_; }
49 #endif 49 #endif
50 50
51 private: 51 private:
(...skipping 16 matching lines...) Expand all
68 #endif 68 #endif
69 69
70 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); 70 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator);
71 }; 71 };
72 72
73 #endif // defined(MEMORY_PRESSURE_IS_POLLING) 73 #endif // defined(MEMORY_PRESSURE_IS_POLLING)
74 74
75 } // namespace memory_pressure 75 } // namespace memory_pressure
76 76
77 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_ 77 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698