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

Side by Side Diff: content/browser/memory/memory_monitor.h

Issue 2360433002: Memory-monitor for Mac. (Closed)
Patch Set: calculate adjustment based on poll interval; limit calculations to avoid overflow 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_ 5 #ifndef CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_
6 #define CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_ 6 #define CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 class CONTENT_EXPORT MemoryMonitorDelegate { 44 class CONTENT_EXPORT MemoryMonitorDelegate {
45 public: 45 public:
46 static MemoryMonitorDelegate* GetInstance(); 46 static MemoryMonitorDelegate* GetInstance();
47 47
48 MemoryMonitorDelegate() {} 48 MemoryMonitorDelegate() {}
49 virtual ~MemoryMonitorDelegate(); 49 virtual ~MemoryMonitorDelegate();
50 50
51 // Returns system memory information. 51 // Returns system memory information.
52 virtual void GetSystemMemoryInfo(base::SystemMemoryInfoKB* mem_info); 52 virtual void GetSystemMemoryInfo(base::SystemMemoryInfoKB* mem_info);
53 53
54 // Gets the system memory-pressure information. Returns true if successful
55 // or false otherwise.
chrisha 2016/11/14 18:14:31 Expand the comment that this is only defined on so
bcwhite 2016/11/15 23:15:09 Done.
56 virtual bool GetSystemMemoryPressure(int* mem_pressure);
chrisha 2016/11/09 21:21:11 Can't we push this to the MemoryMonitorMacDelegate
bcwhite 2016/11/09 22:46:54 I tried that but it makes tests problematic becaus
57
54 private: 58 private:
55 friend struct base::DefaultSingletonTraits<MemoryMonitorDelegate>; 59 friend struct base::DefaultSingletonTraits<MemoryMonitorDelegate>;
56 60
57 DISALLOW_COPY_AND_ASSIGN(MemoryMonitorDelegate); 61 DISALLOW_COPY_AND_ASSIGN(MemoryMonitorDelegate);
58 }; 62 };
59 63
60 } // namespace content 64 } // namespace content
61 65
62 #endif // CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_ 66 #endif // CONTENT_BROWSER_MEMORY_BROWSER_MEMORY_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698