Index: chrome/browser/oom_priority_manager.h |
=================================================================== |
--- chrome/browser/oom_priority_manager.h (revision 101722) |
+++ chrome/browser/oom_priority_manager.h (working copy) |
@@ -68,6 +68,10 @@ |
// Called by AdjustOomPriorities. Runs on the file thread. |
void DoAdjustOomPriorities(); |
+ // Called when a tab comes into focus. Runs on the file thread. |
+ // Sets the score of only the currently focused tab to the least value. |
+ void AdjustTabScore(base::ProcessHandle pid); |
+ |
static bool CompareRendererStats(RendererStats first, RendererStats second); |
virtual void Observe(int type, |
@@ -78,10 +82,12 @@ |
// renderer_stats_ is used on both UI and file threads. |
base::Lock renderer_stats_lock_; |
StatsList renderer_stats_; |
+ // This lock is for pid_to_oom_score_ and last_set_score_. |
James Cook
2011/09/19 17:08:55
Thanks for a separate comment!
|
+ base::Lock pid_to_oom_score_lock_; |
// map maintaining the process - oom_score map. |
- base::Lock pid_to_oom_score_lock_; |
ProcessScoreMap pid_to_oom_score_; |
NotificationRegistrar registrar_; |
+ int last_used_score_; |
DISALLOW_COPY_AND_ASSIGN(OomPriorityManager); |
}; |