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

Unified Diff: chrome/browser/memory/oom_priority_manager.h

Issue 1249693002: Improve the about/discards UI, allowing each tab to be individually closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/oom_priority_manager.cc » ('j') | chrome/browser/ui/webui/about_ui.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..62ae1954e0c18cf3c764f2a5fff263e090bd3aeb 100644
--- a/chrome/browser/memory/oom_priority_manager.h
+++ b/chrome/browser/memory/oom_priority_manager.h
@@ -56,15 +56,19 @@ 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.
Georges Khalil 2015/07/21 18:13:37 nit: Add "Must be called on UI thread." (not impli
proberge 2015/07/21 18:29:06 Done.
+ 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.
bool DiscardTab();
+ // Discards a tab with the given unique ID.
Georges Khalil 2015/07/21 18:13:37 nit: Fix wrap.
proberge 2015/07/21 18:29:06 Done.
+ // 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.
Georges Khalil 2015/07/21 18:13:37 Better comments, good! :)
proberge 2015/07/21 18:29:06 Acknowledged.
+ 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 +87,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 +102,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,
« no previous file with comments | « no previous file | chrome/browser/memory/oom_priority_manager.cc » ('j') | chrome/browser/ui/webui/about_ui.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698