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

Unified Diff: chrome/browser/chromeos/arc/process/arc_process.h

Issue 2874543002: Refactor ARC OOM handler code (Closed)
Patch Set: rebase Created 3 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
Index: chrome/browser/chromeos/arc/process/arc_process.h
diff --git a/chrome/browser/chromeos/arc/process/arc_process.h b/chrome/browser/chromeos/arc/process/arc_process.h
index f4ee65c687186e771038bd9f6f2b6f1c135e9a0d..cc3842e018f752bcda3c45bc3c4b8a108763c3e7 100644
--- a/chrome/browser/chromeos/arc/process/arc_process.h
+++ b/chrome/browser/chromeos/arc/process/arc_process.h
@@ -39,6 +39,16 @@ class ArcProcess {
std::vector<std::string>& packages() { return packages_; }
const std::vector<std::string>& packages() const { return packages_; }
+ // Returns true if the process is likely visible to the user. When it is
+ // visible, Chrome should not kill the process.
+ bool IsUserVisible() const;
+
+ // Returns true if it is okay for the kernel OOM killer to kill the process.
+ // TODO(cylee|yusukes): Check what stock Android does for handling OOM and
+ // adjust IsUserVisible() and/or IsKillableForKernel() as needed.
+ // crbug.com/719537
+ bool IsKillableForKernel() const;
Luis Héctor Chávez 2017/05/09 23:00:10 nit: IsKillableByKernel() or IsKernelKillable()
Yusuke Sato 2017/05/09 23:20:12 Done.
+
private:
base::ProcessId nspid_;
base::ProcessId pid_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/process/arc_process.cc » ('j') | chrome/browser/chromeos/arc/process/arc_process.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698