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

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

Issue 2350423003: [Tentaive patch for discussion] Add Purge+Suspend metrics as UMA.
Patch Set: Fixed misuse of CanPurgeAndSuspend Created 4 years, 3 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/tab_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory/tab_manager.h
diff --git a/chrome/browser/memory/tab_manager.h b/chrome/browser/memory/tab_manager.h
index e681782791bfda6063401bb0f54e6c55ecca55f1..ddf3b5b34429edd5d6caecc57076c0601371c501 100644
--- a/chrome/browser/memory/tab_manager.h
+++ b/chrome/browser/memory/tab_manager.h
@@ -227,6 +227,9 @@ class TabManager : public TabStripModelObserver {
// Purges data structures in the browser that can be easily recomputed.
void PurgeBrowserMemory();
+ // Records UMA histogram statistics for a renderer purge and suspend.
+ void RecordPurgeAndSuspendMetrics(const base::ProcessHandle& handle);
+
// Returns the number of tabs open in all browser instances.
int GetTabCount() const;
@@ -244,6 +247,10 @@ class TabManager : public TabStripModelObserver {
// 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 purged and
+ // suspended by purge+susend backgrounded tab mechanism.
+ bool CanPurgeAndSuspendBackgroundedTab(int64_t target_web_contents_id) const;
+
// Purges and suspends renderers in backgrounded tabs.
void PurgeAndSuspendBackgroundedTabs();
« no previous file with comments | « no previous file | chrome/browser/memory/tab_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698