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

Unified Diff: chrome/browser/memory/tab_manager_delegate_chromeos.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/memory/tab_manager_delegate_chromeos.h
diff --git a/chrome/browser/memory/tab_manager_delegate_chromeos.h b/chrome/browser/memory/tab_manager_delegate_chromeos.h
index 0c86a2658908dcb745c5765434bcfe261a9d0a99..46a6119d21f0b4c67666f0fa4d9e13cdec10d94d 100644
--- a/chrome/browser/memory/tab_manager_delegate_chromeos.h
+++ b/chrome/browser/memory/tab_manager_delegate_chromeos.h
@@ -162,6 +162,12 @@ class TabManagerDelegate : public aura::client::ActivationChangeObserver,
int range_end,
ProcessScoreMap* new_map);
+ // Changes |candidates|' OOM scores to |score|. The new scores are set in
+ // |new_map|.
+ void SetOomScore(const std::vector<TabManagerDelegate::Candidate>& candidates,
+ int score,
+ ProcessScoreMap* new_map);
+
// Initiates an oom priority adjustment.
void ScheduleEarlyOomPrioritiesAdjustment();
@@ -173,6 +179,9 @@ class TabManagerDelegate : public aura::client::ActivationChangeObserver,
return base::TimeDelta::FromSeconds(60);
}
+ // The lowest OOM adjustment score that will make the process non-killable.
+ static const int kLowestOomScore;
+
// Holds a reference to the owning TabManager.
const base::WeakPtr<TabManager> tab_manager_;

Powered by Google App Engine
This is Rietveld 408576698