Index: chrome/browser/memory/oom_priority_manager.h |
diff --git a/chrome/browser/memory/oom_priority_manager.h b/chrome/browser/memory/oom_priority_manager.h |
index 5401e61571fdfbdbd7f04fc51f8a2ea55ca64372..07b6f17170a90fc2b214088f2285ebd875e6bb81 100644 |
--- a/chrome/browser/memory/oom_priority_manager.h |
+++ b/chrome/browser/memory/oom_priority_manager.h |
@@ -53,7 +53,9 @@ class OomPriorityManager { |
// See member comment. |
bool recent_tab_discard() const { return recent_tab_discard_; } |
- void Start(); |
+ // If |discard_once| is set, tabs that get discarded once will never get |
+ // discarded again. |
+ void Start(bool discard_once); |
void Stop(); |
// Returns the list of the stats for all renderers. Must be called on the UI |
@@ -113,6 +115,11 @@ class OomPriorityManager { |
// that need to be run periodically (see comment in implementation). |
void UpdateTimerCallback(); |
+ // Goes through a list of checks to see if a tab is allowed to be discarded by |
+ // the automatic tab discarding mechanism. Note that this is not used when |
+ // discarding a particular tab from about:discards. |
+ bool CanDiscardTab(int64 target_web_contents_id) const; |
+ |
static bool CompareTabStats(TabStats first, TabStats second); |
// Called by the memory pressure listener when the memory pressure rises. |
@@ -147,6 +154,9 @@ class OomPriorityManager { |
// used for statistics normalized by usage. |
bool recent_tab_discard_; |
+ // Whether we ever only discard a tab once. |
+ bool discard_once_; |
+ |
#if defined(OS_CHROMEOS) |
scoped_ptr<OomPriorityManagerDelegate> delegate_; |
#endif |