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

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

Issue 2462513002: Add Resume logic of Purge+Suspend to TabManager. (Closed)
Patch Set: Fixed Created 4 years, 1 month 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 497788accfca4fc6e848fc7cf875d55d63bb74b4..92ebc887cf0a8566ac907b3f32d449f356dc62d6 100644
--- a/chrome/browser/memory/tab_manager_web_contents_data.cc
+++ b/chrome/browser/memory/tab_manager_web_contents_data.cc
@@ -204,7 +204,7 @@ bool TabManager::WebContentsData::IsAutoDiscardable() {
void TabManager::WebContentsData::SetPurgeAndSuspendState(
PurgeAndSuspendState state) {
- last_purge_and_suspend_modified_time_ = TimeTicks::Now();
+ last_purge_and_suspend_modified_time_ = NowTicks();
purge_and_suspend_state_ = state;
}
@@ -213,6 +213,11 @@ base::TimeTicks TabManager::WebContentsData::LastPurgeAndSuspendModifiedTime()
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_;
« 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