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

Side by Side Diff: chrome/browser/chromeos/arc/arc_lowmemorykiller_monitor.h

Issue 1780183003: ArcLowMemoryKillerMonitor: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_ARC_LOWMEMORYKILLER_MONITOR_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_ARC_LOWMEMORYKILLER_MONITOR_H_
7
8 #include "base/threading/sequenced_worker_pool.h"
9
10 namespace arc {
11
12 // Trace lowmemorykiller events and report to UMA.
13 //
14 // If kernel lowmemorykiller is enabled, it would kill processes automatically
15 // on memory pressure. ArcLowMemoryKillerMonitor listens on lowmemorykiller log
16 // from kernel space and reports to UMA.
17 //
18 // Note: There should be only one ArcLowMemoryKillerMonitor instance during the
19 // power cycle of a ChromeOS device, otherwise an lowmemorykiller event would be
Yusuke Sato 2016/03/12 00:24:29 Chrome OS (here and elsewhere)
cylee1 2016/03/14 13:03:35 Done.
20 // reported twice since it reads in the entire kernel log from head.
21 // On ChromeOS, it should live within a main browser thread.
22 class ArcLowMemoryKillerMonitor {
23 public:
24 ArcLowMemoryKillerMonitor();
25 ~ArcLowMemoryKillerMonitor();
26
27 void Start();
28 void Stop();
29
30 private:
31 void Run();
32
33 scoped_refptr<base::SequencedWorkerPool> worker_pool_;
34
35 DISALLOW_COPY_AND_ASSIGN(ArcLowMemoryKillerMonitor);
Yusuke Sato 2016/03/12 00:24:29 #include base/macros.h is needed for DISALLOW_COPY
cylee1 2016/03/14 13:03:35 Done.
36 };
37
38 } // namespace arc
39
40 #endif // CHROME_BROWSER_CHROMEOS_ARC_ARC_LOWMEMORYKILLER_MONITOR_H_"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698