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

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

Issue 2332423002: Added memory-monitor for ChromeOS. (Closed)
Patch Set: fixed name of ChromeOS Created 4 years, 3 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 | « content/browser/memory/memory_monitor_chromeos_unittest.cc ('k') | content/test/BUILD.gn » ('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 (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_MEMORY_MONITOR_LINUX_H_ 5 #ifndef CONTENT_BROWSER_MEMORY_MEMORY_MONITOR_LINUX_H_
6 #define CONTENT_BROWSER_MEMORY_MEMORY_MONITOR_LINUX_H_ 6 #define CONTENT_BROWSER_MEMORY_MEMORY_MONITOR_LINUX_H_
7 7
8 #include "content/browser/memory/memory_monitor.h" 8 #include "content/browser/memory/memory_monitor.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 10
11 namespace base {
12 struct SystemMemoryInfoKB;
13 } // namespace base
14
15 namespace content { 11 namespace content {
16 12
17 // A memory monitor for the Linux platform. 13 // A memory monitor for the Linux platform.
18 class CONTENT_EXPORT MemoryMonitorLinux : public MemoryMonitor { 14 class CONTENT_EXPORT MemoryMonitorLinux : public MemoryMonitor {
19 public: 15 public:
20 MemoryMonitorLinux(MemoryMonitorDelegate* delegate); 16 MemoryMonitorLinux(MemoryMonitorDelegate* delegate);
21 ~MemoryMonitorLinux() override; 17 ~MemoryMonitorLinux() override;
22 18
23 // MemoryMonitor: 19 // MemoryMonitor:
24 int GetFreeMemoryUntilCriticalMB() override; 20 int GetFreeMemoryUntilCriticalMB() override;
25 21
26 // Factory function to create an instance of this class. 22 // Factory function to create an instance of this class.
27 static std::unique_ptr<MemoryMonitorLinux> Create( 23 static std::unique_ptr<MemoryMonitorLinux> Create(
28 MemoryMonitorDelegate* delegate); 24 MemoryMonitorDelegate* delegate);
29 25
30 private: 26 private:
31 // The delegate to be used for retrieving system memory information. Used as a 27 // The delegate to be used for retrieving system memory information. Used as a
32 // testing seam. 28 // testing seam.
33 MemoryMonitorDelegate* delegate_; 29 MemoryMonitorDelegate* delegate_;
34 }; 30 };
35 31
36 } // namespace content 32 } // namespace content
37 33
38 #endif // CONTENT_BROWSER_MEMORY_MEMORY_MONITOR_LINUX_H_ 34 #endif // CONTENT_BROWSER_MEMORY_MEMORY_MONITOR_LINUX_H_
OLDNEW
« no previous file with comments | « content/browser/memory/memory_monitor_chromeos_unittest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698