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

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

Issue 2704443006: Make time_to_first_suspension's default 1800sec (Closed)
Patch Set: Modified unittest to test default value 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..37933e54b104d050b4dddef70a3242f0f9c9174f 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.
+ // There is no strong reason why its default value is 30 minutes.
Wez 2017/02/17 19:03:14 nit: No need to say "no strong reason"; sufficient
tasak 2017/02/20 07:07:15 Done.
+ // At least, the value should not be small, because quickly purging memory
+ // makes it slower to switch tabs.
+ static const int kDefaultTimeToFirstSuspensionSeconds = 1800;
Wez 2017/02/17 19:03:14 Note that you'll also need to fix this in the Finc
Wez 2017/02/17 19:03:14 nit: I'd suggest using "Suspend" rather than "Susp
tasak 2017/02/20 07:07:15 Done.
tasak 2017/02/20 07:07:15 Acknowledged.
+
// 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