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

Unified Diff: chrome/browser/memory/tab_manager_delegate_chromeos.cc

Issue 1891423003: TabManagerDelegator: Disable kernel lowmemorykiller if memory management is handled by Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | components/arc/common/process.mojom » ('j') | components/arc/common/process.mojom » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_manager_delegate_chromeos.cc
diff --git a/chrome/browser/memory/tab_manager_delegate_chromeos.cc b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
index 3cd077f2c6b7f78c59ce9575508db4173953cfff..a0184f1a06d523b254d2b622aadf3abd8d4c6942 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.cc
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
@@ -134,10 +134,11 @@ void TabManagerDelegate::OnProcessInstanceReady() {
arc_process_instance_ = arc_bridge_service->process_instance();
arc_process_instance_version_ = arc_bridge_service->process_version();
+ DCHECK(arc_process_instance_);
+
if (!IsArcMemoryManagementEnabled())
return;
- DCHECK(arc_process_instance_);
if (arc_process_instance_version_ < 2) {
VLOG(1) << "arc::ProcessInstance version < 2 does not "
"support DisableBuiltinOomAdjustment() yet.";
@@ -146,6 +147,13 @@ void TabManagerDelegate::OnProcessInstanceReady() {
// If --enable-arc-memory-management is on, stop Android system-wide
// oom_adj adjustment since this class will take over oom_score_adj settings.
arc_process_instance_->DisableBuiltinOomAdjustment();
+
+ if (arc_process_instance_version_ < 3) {
+ VLOG(1) << "arc::ProcessInstance version < 3 does not "
+ "support DisableLowMemoryKiller() yet.";
+ return;
+ }
+ arc_process_instance_->DisableLowMemoryKiller();
}
void TabManagerDelegate::OnProcessInstanceClosed() {
« no previous file with comments | « no previous file | components/arc/common/process.mojom » ('j') | components/arc/common/process.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698