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

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

Issue 2754483003: Enable TabManager to kill foreground Android apps.
Patch Set: Enable TabManager to kill visible Android apps. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
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 2d6e2866180e69f65fe8d8712addb532d5da5a5c..a422b434496dc60a71ce9a2f533af1b5c9168d07 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.cc
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
@@ -593,11 +593,11 @@ void TabManagerDelegate::LowMemoryKillImpl(
// backwards.
for (auto it = candidates.rbegin(); it != candidates.rend(); ++it) {
VLOG(3) << "Target memory to free: " << target_memory_to_free_kb << " KB";
- // Never kill selected tab or Android foreground app, regardless whether
- // they're in the active window. Since the user experience would be bad.
+ // Never kill selected tab to align with the behavior in other platforms.
+ // Note that non-focused Android apps are prone to be killed, however,
+ // regardless of their visibility.
ProcessType process_type = it->process_type();
- if (process_type == ProcessType::VISIBLE_APP ||
- process_type == ProcessType::FOCUSED_APP ||
+ if (process_type == ProcessType::FOCUSED_APP ||
process_type == ProcessType::FOCUSED_TAB) {
VLOG(2) << "Skipped killing " << *it;
continue;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698