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

Unified Diff: base/mac/memory_pressure_monitor.h

Issue 1149223002: Avoid basename conflict from memory_pressure_monitor.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: includes 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
« no previous file with comments | « base/chromeos/memory_pressure_monitor_unittest.cc ('k') | base/mac/memory_pressure_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/memory_pressure_monitor.h
diff --git a/base/mac/memory_pressure_monitor.h b/base/mac/memory_pressure_monitor.h
deleted file mode 100644
index afaec274715aad5a3890585bbc90e2af2991ff91..0000000000000000000000000000000000000000
--- a/base/mac/memory_pressure_monitor.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// 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_H_
-#define BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
-
-#include <dispatch/dispatch.h>
-
-#include "base/base_export.h"
-#include "base/memory/memory_pressure_listener.h"
-#include "base/memory/memory_pressure_monitor.h"
-
-// The following was added to <dispatch/source.h> after 10.8.
-// TODO(shrike): Remove the DISPATCH_MEMORYPRESSURE_NORMAL ifndef once builders
-// reach 10.9 or higher.
-#ifndef DISPATCH_MEMORYPRESSURE_NORMAL
-
-#define DISPATCH_MEMORYPRESSURE_NORMAL 0x01
-#define DISPATCH_MEMORYPRESSURE_WARN 0x02
-#define DISPATCH_MEMORYPRESSURE_CRITICAL 0x04
-
-#endif // DISPATCH_MEMORYPRESSURE_NORMAL
-
-namespace base {
-namespace mac {
-
-class TestMemoryPressureMonitor;
-
-struct DispatchSourceSDeleter {
- void operator()(dispatch_source_s* ptr) {
- dispatch_source_cancel(ptr);
- dispatch_release(ptr);
- }
-};
-
-// Declares the interface for the Mac MemoryPressureMonitor, which reports
-// memory pressure events and status.
-class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor {
- public:
- MemoryPressureMonitor();
- ~MemoryPressureMonitor() override;
-
- // Returns the currently-observed memory pressure.
- MemoryPressureLevel GetCurrentPressureLevel() const override;
-
- private:
- friend TestMemoryPressureMonitor;
-
- static MemoryPressureLevel
- MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure);
- static void NotifyMemoryPressureChanged(dispatch_source_s* event_source);
-
- scoped_ptr<dispatch_source_s, DispatchSourceSDeleter>
- memory_level_event_source_;
-
- DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
-};
-
-} // namespace mac
-} // namespace base
-
-#endif // BASE_MAC_MEMORY_PRESSURE_MONITOR_H_
« no previous file with comments | « base/chromeos/memory_pressure_monitor_unittest.cc ('k') | base/mac/memory_pressure_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698