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

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

Issue 2704443006: Make time_to_first_suspension's default 1800sec (Closed)
Patch Set: Fixed style. Created 3 years, 10 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 0e2d48a8b0bd40bec5a18596dd952e9e51bb1bbe..c384b7e054b07fa3eb20ad6b794bd748fcaf5665 100644
--- a/chrome/browser/memory/tab_manager.h
+++ b/chrome/browser/memory/tab_manager.h
@@ -178,6 +178,12 @@ class TabManager : public TabStripModelObserver {
FRIEND_TEST_ALL_PREFIXES(TabManagerTest, TabManagerBasics);
FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, PurgeAndSuspendState);
+ // The time of the first purging after a renderer is backgrounded.
+ // The initial value was chosen because most of users activate backgrounded
+ // tabs within 30 minutes. (c.f. Tabs.StateTransfer.Time_Inactive_Active)
+ static constexpr base::TimeDelta kDefaultTimeToFirstPurge =
+ base::TimeDelta::FromMinutes(30);
+
// This is needed so WebContentsData can call OnDiscardedStateChange, and
// can use PurgeAndSuspendState.
friend class WebContentsData;
« 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