| Index: chrome/browser/memory/tab_manager_web_contents_data.h
|
| diff --git a/chrome/browser/memory/tab_manager_web_contents_data.h b/chrome/browser/memory/tab_manager_web_contents_data.h
|
| index c24598293100339d45cac1997233491d94c38255..fdbf094f5d6484b42acebc6937484e856a06a132 100644
|
| --- a/chrome/browser/memory/tab_manager_web_contents_data.h
|
| +++ b/chrome/browser/memory/tab_manager_web_contents_data.h
|
| @@ -79,6 +79,22 @@ class TabManager::WebContentsData
|
| // Sets/clears the auto-discardable state of the tab.
|
| void SetAutoDiscardableState(bool state);
|
|
|
| + // Sets the current purge-and-suspend state, and update the timestamp,
|
| + // i.e. the last purge-and-suspend modified time.
|
| + // TODO(tasak): remove this after PurgeAndSuspend code is moved into
|
| + // MemoryCoordinator.
|
| + void SetPurgeAndSuspendState(TabManager::PurgeAndSuspendState state);
|
| +
|
| + // Returns the last purge-and-suspend modified time.
|
| + // TODO(tasak): remove this after PurgeAndSuspend code is moved into
|
| + // MemoryCoordinator.
|
| + base::TimeTicks LastPurgeAndSuspendModifiedTime() const;
|
| +
|
| + // Returns the current state of purge-and-suspend.
|
| + // TODO(tasak): remove this after PurgeAndSuspend code is moved into
|
| + // MemoryCoordinator.
|
| + TabManager::PurgeAndSuspendState GetPurgeAndSuspendState() const;
|
| +
|
| private:
|
| // Needed to access tab_data_.
|
| FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, CopyState);
|
| @@ -121,6 +137,12 @@ class TabManager::WebContentsData
|
| // this test clock. Otherwise it returns the system clock's value.
|
| base::TickClock* test_tick_clock_;
|
|
|
| + // The last time purge-and-suspend state was modified.
|
| + base::TimeTicks last_purge_and_suspend_modified_time_;
|
| +
|
| + // The current state of purge-and-suspend.
|
| + PurgeAndSuspendState purge_and_suspend_state_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WebContentsData);
|
| };
|
|
|
|
|