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

Unified Diff: base/mac/memory_pressure_monitor.h

Issue 1124163003: Rename OS-specific MemoryPressureMonitor implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error on ChromeOS. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: base/mac/memory_pressure_monitor.h
diff --git a/base/mac/memory_pressure_monitor_mac.h b/base/mac/memory_pressure_monitor.h
similarity index 73%
rename from base/mac/memory_pressure_monitor_mac.h
rename to base/mac/memory_pressure_monitor.h
index 8dc2622de488857b60c2c3539fd338d6f2136933..afaec274715aad5a3890585bbc90e2af2991ff91 100644
--- a/base/mac/memory_pressure_monitor_mac.h
+++ b/base/mac/memory_pressure_monitor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MAC_MEMORY_PRESSURE_MONITOR_MAC_H_
-#define BASE_MAC_MEMORY_PRESSURE_MONITOR_MAC_H_
+#ifndef BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
+#define BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
#include <dispatch/dispatch.h>
@@ -23,8 +23,9 @@
#endif // DISPATCH_MEMORYPRESSURE_NORMAL
namespace base {
+namespace mac {
-class TestMemoryPressureMonitorMac;
+class TestMemoryPressureMonitor;
struct DispatchSourceSDeleter {
void operator()(dispatch_source_s* ptr) {
@@ -35,17 +36,16 @@ struct DispatchSourceSDeleter {
// Declares the interface for the Mac MemoryPressureMonitor, which reports
// memory pressure events and status.
-class BASE_EXPORT MemoryPressureMonitorMac : public MemoryPressureMonitor {
+class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
public:
- using MemoryPressureLevel = base::MemoryPressureListener::MemoryPressureLevel;
- MemoryPressureMonitorMac();
- ~MemoryPressureMonitorMac() override;
+ MemoryPressureMonitor();
+ ~MemoryPressureMonitor() override;
// Returns the currently-observed memory pressure.
MemoryPressureLevel GetCurrentPressureLevel() const override;
private:
- friend TestMemoryPressureMonitorMac;
+ friend TestMemoryPressureMonitor;
static MemoryPressureLevel
MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure);
@@ -54,9 +54,10 @@ class BASE_EXPORT MemoryPressureMonitorMac : public MemoryPressureMonitor {
scoped_ptr<dispatch_source_s, DispatchSourceSDeleter>
memory_level_event_source_;
- DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitorMac);
+ DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
};
+} // namespace mac
} // namespace base
-#endif // BASE_MAC_MEMORY_PRESSURE_MONITOR_MAC_H_
+#endif // BASE_MAC_MEMORY_PRESSURE_MONITOR_H_

Powered by Google App Engine
This is Rietveld 408576698