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

Side by Side Diff: base/memory/memory_pressure_monitor.h

Issue 2495003004: [Mac] Report statistics more regularly in Mac memory pressure monitor (Closed)
Patch Set: Fix parameter name in header Created 4 years, 1 month 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 BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_ 5 #ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_
6 #define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_ 6 #define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 17 matching lines...) Expand all
28 28
29 virtual ~MemoryPressureMonitor(); 29 virtual ~MemoryPressureMonitor();
30 30
31 // Return the singleton MemoryPressureMonitor. 31 // Return the singleton MemoryPressureMonitor.
32 static MemoryPressureMonitor* Get(); 32 static MemoryPressureMonitor* Get();
33 33
34 // Record memory pressure UMA statistic. A tick is 5 seconds. 34 // Record memory pressure UMA statistic. A tick is 5 seconds.
35 static void RecordMemoryPressure(MemoryPressureLevel level, int ticks); 35 static void RecordMemoryPressure(MemoryPressureLevel level, int ticks);
36 36
37 // Returns the currently observed memory pressure. 37 // Returns the currently observed memory pressure.
38 virtual MemoryPressureLevel GetCurrentPressureLevel() const = 0; 38 virtual MemoryPressureLevel GetCurrentPressureLevel() = 0;
39 39
40 // Sets a notification callback. The default callback invokes 40 // Sets a notification callback. The default callback invokes
41 // base::MemoryPressureListener::NotifyMemoryPressure. 41 // base::MemoryPressureListener::NotifyMemoryPressure.
42 virtual void SetDispatchCallback(const DispatchCallback& callback) = 0; 42 virtual void SetDispatchCallback(const DispatchCallback& callback) = 0;
43 43
44 protected: 44 protected:
45 MemoryPressureMonitor(); 45 MemoryPressureMonitor();
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor); 48 DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
49 }; 49 };
50 50
51 } // namespace base 51 } // namespace base
52 52
53 #endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_ 53 #endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_H_
OLDNEW
« no previous file with comments | « no previous file | base/memory/memory_pressure_monitor_chromeos.h » ('j') | base/memory/memory_pressure_monitor_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698