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

Unified Diff: base/memory/memory_pressure_monitor_mac.h

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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/memory/memory_pressure_monitor_mac.h
diff --git a/base/mac/memory_pressure_monitor_mac.h b/base/memory/memory_pressure_monitor_mac.h
similarity index 73%
rename from base/mac/memory_pressure_monitor_mac.h
rename to base/memory/memory_pressure_monitor_mac.h
index 8dc2622de488857b60c2c3539fd338d6f2136933..8d4c26a55f0c0ded0a8260afea68d49549ea940f 100644
--- a/base/mac/memory_pressure_monitor_mac.h
+++ b/base/memory/memory_pressure_monitor_mac.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_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
+#define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_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_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
« no previous file with comments | « base/memory/memory_pressure_monitor_chromeos_unittest.cc ('k') | base/memory/memory_pressure_monitor_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698