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

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

Issue 2167843004: Discardable property support on TabManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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.h
diff --git a/chrome/browser/memory/tab_manager_web_contents_data.h b/chrome/browser/memory/tab_manager_web_contents_data.h
index 4830b773f7fdd896f0aac3f4b97ed167e3bee23c..2d0bc2c21c5795b5501c26dc73dac233d079d3c0 100644
--- a/chrome/browser/memory/tab_manager_web_contents_data.h
+++ b/chrome/browser/memory/tab_manager_web_contents_data.h
@@ -72,6 +72,12 @@ class TabManager::WebContentsData
// |test_tick_clock_| for more details.
void set_test_tick_clock(base::TickClock* test_tick_clock);
+ // Returns true if the tab is auto discardable by auto discarding feature.
Georges Khalil 2016/07/22 15:07:57 nit: comment change: Returns the auto discardable
Anderson Silva 2016/07/22 15:34:51 Done.
+ bool IsAutoDiscardable();
+
+ // Sets/clears the auto discardable state of the tab.
+ void SetAutoDiscardableState(bool state);
+
private:
// Needed to access tab_data_.
FRIEND_TEST_ALL_PREFIXES(TabManagerWebContentsDataTest, CopyState);
@@ -99,6 +105,8 @@ class TabManager::WebContentsData
base::TimeTicks last_inactive_time_;
// Site Engagement score (set to -1 if not available).
double engagement_score_;
+ // Is tab eligible for auto discarding by TabManager? Defaults to true.
Georges Khalil 2016/07/22 15:07:57 nit: remove "by TabManager".
Anderson Silva 2016/07/22 15:34:52 Done.
+ bool is_auto_discardable;
};
// Returns either the system's clock or the test clock. See |test_tick_clock_|

Powered by Google App Engine
This is Rietveld 408576698