Chromium Code Reviews| 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 ec59b32ac834f307ad016252b7a9a2784d1d947d..41e23b912c1ddd5e407b50a440727b825906fdff 100644 |
| --- a/chrome/browser/memory/oom_priority_manager.h |
| +++ b/chrome/browser/memory/oom_priority_manager.h |
| @@ -56,15 +56,20 @@ class OomPriorityManager { |
| void Start(); |
| void Stop(); |
| - // Returns list of tab titles sorted from most interesting (don't kill) |
| - // to least interesting (OK to kill). |
| - std::vector<base::string16> GetTabTitles(); |
| + // Returns the list of the stats for all renderers. Must be called on an UI |
|
Georges Khalil
2015/07/21 18:38:29
nit: on the UI thread (there's only one).
proberge
2015/07/21 18:55:09
Done.
|
| + // thread. |
| + TabStatsList GetTabStats(); |
| - // Discards a tab to free the memory occupied by its renderer. |
| - // Tab still exists in the tab-strip; clicking on it will reload it. |
| - // Returns true if it successfully found a tab and discarded it. |
| + // Discards a tab to free the memory occupied by its renderer. The tab still |
| + // exists in the tab-strip; clicking on it will reload it. Returns true if it |
| + // successfully found a tab and discarded it. |
| bool DiscardTab(); |
| + // Discards a tab with the given unique ID. The tab still exists in the |
| + // tab-strip; clicking on it will reload it. Returns true if it successfully |
| + // found a tab and discarded it. |
| + bool DiscardTabById(int64 target_web_contents_id); |
| + |
| // Log memory statistics for the running processes, then discards a tab. |
| // Tab discard happens sometime later, as collecting the statistics touches |
| // multiple threads and takes time. |
| @@ -83,9 +88,6 @@ class OomPriorityManager { |
| // can be easily reloaded and hence makes a good choice to discard. |
| static bool IsInternalPage(const GURL& url); |
| - // Discards a tab with the given unique ID. Returns true if discard occurred. |
| - bool DiscardTabById(int64 target_web_contents_id); |
| - |
| // Records UMA histogram statistics for a tab discard. We record statistics |
| // for user triggered discards via chrome://discards/ because that allows us |
| // to manually test the system. |
| @@ -101,9 +103,6 @@ class OomPriorityManager { |
| // Returns the number of tabs open in all browser instances. |
| int GetTabCount() const; |
| - // Returns the list of the stats for all renderers. |
| - TabStatsList GetTabStatsOnUIThread(); |
| - |
| // Adds all the stats of the tabs in |browser_list| into |stats_list|. If |
| // |active_desktop| is true, we consider its first window as being active. |
| void AddTabStats(BrowserList* browser_list, |