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

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

Issue 2874023003: Don't kill a process if it has IMPORTANT_FOREGROUND or higher priority (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_delegate_chromeos_unittest.cc » ('j') | 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 02ecbd66082c001cfadf4838dc00980d03710707..6f4307ff7d5883538bb4bac55d17694cb2bc225d 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.cc
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.cc
@@ -152,8 +152,10 @@ ProcessType TabManagerDelegate::Candidate::GetProcessTypeInternal() const {
if (app()) {
if (app()->is_focused())
return ProcessType::FOCUSED_APP;
- if (app()->process_state() == arc::mojom::ProcessState::TOP)
+ if (app()->process_state() <=
+ arc::mojom::ProcessState::IMPORTANT_FOREGROUND) {
return ProcessType::VISIBLE_APP;
+ }
return ProcessType::BACKGROUND_APP;
}
if (tab()) {
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager_delegate_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698