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

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

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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
« no previous file with comments | « base/memory/memory_pressure_monitor_chromeos_unittest.cc ('k') | base/memory/scoped_vector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MAC_H_ 5 #ifndef BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
6 #define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_ 6 #define BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
7 7
8 #include <dispatch/dispatch.h> 8 #include <dispatch/dispatch.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Returns the currently-observed memory pressure. 45 // Returns the currently-observed memory pressure.
46 MemoryPressureLevel GetCurrentPressureLevel() const override; 46 MemoryPressureLevel GetCurrentPressureLevel() const override;
47 47
48 private: 48 private:
49 friend TestMemoryPressureMonitor; 49 friend TestMemoryPressureMonitor;
50 50
51 static MemoryPressureLevel 51 static MemoryPressureLevel
52 MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure); 52 MemoryPressureLevelForMacMemoryPressure(int mac_memory_pressure);
53 static void NotifyMemoryPressureChanged(dispatch_source_s* event_source); 53 static void NotifyMemoryPressureChanged(dispatch_source_s* event_source);
54 54
55 scoped_ptr<dispatch_source_s, DispatchSourceSDeleter> 55 std::unique_ptr<dispatch_source_s, DispatchSourceSDeleter>
56 memory_level_event_source_; 56 memory_level_event_source_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor); 58 DISALLOW_COPY_AND_ASSIGN(MemoryPressureMonitor);
59 }; 59 };
60 60
61 } // namespace mac 61 } // namespace mac
62 } // namespace base 62 } // namespace base
63 63
64 #endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_ 64 #endif // BASE_MEMORY_MEMORY_PRESSURE_MONITOR_MAC_H_
OLDNEW
« no previous file with comments | « base/memory/memory_pressure_monitor_chromeos_unittest.cc ('k') | base/memory/scoped_vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698