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

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

Issue 2874543002: Refactor ARC OOM handler code (Closed)
Patch Set: address comments from Cheng-Yu 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..e2e6faf3b59cadd3fe1e62ce3a9caa0e10edc798 100644
--- a/chrome/browser/chromeos/arc/process/arc_process.h
+++ b/chrome/browser/chromeos/arc/process/arc_process.h
@@ -39,6 +39,17 @@ class ArcProcess {
std::vector<std::string>& packages() { return packages_; }
const std::vector<std::string>& packages() const { return packages_; }
+ // Returns true if the process is important and should be protected more
+ // from OOM kills than other processes.
+ // TODO(cylee|yusukes): Check what stock Android does for handling OOM and
+ // modify this function as needed (crbug.com/719537).
+ bool IsImportant() const;
+
+ // Returns true if it is okay for the kernel OOM killer to kill the process.
+ // TODO(cylee|yusukes): Consider removing this function. Having only
+ // IsImportant() might be good enough.
+ bool IsKernelKillable() const;
+
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