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

Unified Diff: chrome/browser/memory/tab_manager_web_contents_data.cc

Issue 2711093002: Purge once random minutes(between 30min and 60min) after backgrounded. (Closed)
Patch Set: Fixed Created 3 years, 9 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
Index: chrome/browser/memory/tab_manager_web_contents_data.cc
diff --git a/chrome/browser/memory/tab_manager_web_contents_data.cc b/chrome/browser/memory/tab_manager_web_contents_data.cc
index 92ebc887cf0a8566ac907b3f32d449f356dc62d6..b5851677eca5fa2f810302115ca4c99cc9995884 100644
--- a/chrome/browser/memory/tab_manager_web_contents_data.cc
+++ b/chrome/browser/memory/tab_manager_web_contents_data.cc
@@ -22,9 +22,8 @@ namespace memory {
TabManager::WebContentsData::WebContentsData(content::WebContents* web_contents)
: WebContentsObserver(web_contents),
test_tick_clock_(nullptr),
- last_purge_and_suspend_modified_time_(
- base::TimeTicks::FromInternalValue(0)),
- purge_and_suspend_state_(RUNNING) {}
+ time_to_purge_(base::TimeDelta::FromMinutes(30)),
+ is_purged_(false) {}
TabManager::WebContentsData::~WebContentsData() {}
@@ -202,25 +201,4 @@ bool TabManager::WebContentsData::IsAutoDiscardable() {
return tab_data_.is_auto_discardable;
}
-void TabManager::WebContentsData::SetPurgeAndSuspendState(
- PurgeAndSuspendState state) {
- last_purge_and_suspend_modified_time_ = NowTicks();
- purge_and_suspend_state_ = state;
-}
-
-base::TimeTicks TabManager::WebContentsData::LastPurgeAndSuspendModifiedTime()
- const {
- return last_purge_and_suspend_modified_time_;
-}
-
-void TabManager::WebContentsData::SetLastPurgeAndSuspendModifiedTimeForTesting(
- base::TimeTicks timestamp) {
- last_purge_and_suspend_modified_time_ = timestamp;
-}
-
-TabManager::PurgeAndSuspendState
-TabManager::WebContentsData::GetPurgeAndSuspendState() const {
- return purge_and_suspend_state_;
-}
-
} // namespace memory
« no previous file with comments | « chrome/browser/memory/tab_manager_web_contents_data.h ('k') | chrome/browser/memory/tab_manager_web_contents_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698