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

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

Issue 2181493002: Return unique_ptrs from base::ProcessMetrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove os_resource_win.* Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_LINUX_H_ 5 #ifndef COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_LINUX_H_
6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_LINUX_H_ 6 #define COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_LINUX_H_
7 7
8 #include "base/macros.h"
9 #include "base/process/process_metrics.h"
8 #include "components/memory_pressure/memory_pressure_calculator.h" 10 #include "components/memory_pressure/memory_pressure_calculator.h"
9 11
10 #include "base/files/scoped_file.h"
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/process/process_metrics.h"
14 #include "base/timer/timer.h"
15
16 namespace memory_pressure { 12 namespace memory_pressure {
17 13
18 // OS-specific implementation of MemoryPressureCalculator. This is only defined 14 // OS-specific implementation of MemoryPressureCalculator. This is only defined
19 // and used on platforms that do not have native memory pressure signals 15 // 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 16 // (ChromeOS, Linux, Windows). OSes that do have native signals simply hook into
21 // the appropriate subsystem (Android, Mac OS X). 17 // the appropriate subsystem (Android, Mac OS X).
22 class DirectMemoryPressureCalculator : public MemoryPressureCalculator { 18 class DirectMemoryPressureCalculator : public MemoryPressureCalculator {
23 public: 19 public:
24 // Exposed for unittesting. See .cc file for detailed discussion of these 20 // Exposed for unittesting. See .cc file for detailed discussion of these
25 // constants. 21 // constants.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // these. 55 // these.
60 int moderate_threshold_mb_; 56 int moderate_threshold_mb_;
61 int critical_threshold_mb_; 57 int critical_threshold_mb_;
62 58
63 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator); 59 DISALLOW_COPY_AND_ASSIGN(DirectMemoryPressureCalculator);
64 }; 60 };
65 61
66 } // namespace memory_pressure 62 } // namespace memory_pressure
67 63
68 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_LINUX_H_ 64 #endif // COMPONENTS_MEMORY_PRESSURE_DIRECT_MEMORY_PRESSURE_CALCULATOR_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698