Index: chrome/browser/sessions/tab_loader.h |
diff --git a/chrome/browser/sessions/tab_loader.h b/chrome/browser/sessions/tab_loader.h |
index 81c6dd0b1e18fc89ea341b176cf3fc1deac35578..a8dffd92da48fdd487cd5425a0ead3d34cd973b6 100644 |
--- a/chrome/browser/sessions/tab_loader.h |
+++ b/chrome/browser/sessions/tab_loader.h |
@@ -61,6 +61,11 @@ class TabLoader : public content::NotificationObserver, |
static void RestoreTabs(const std::vector<RestoredTab>& tabs, |
const base::TimeTicks& restore_started); |
+ // Limit the number of loaded tabs. |
+ // Value of 0 restores default behavior. In test mode command line flags and |
+ // free memory size are not taken into account. |
+ static void SetMaxLoadedTabCountForTest(size_t value); |
sky
2017/03/02 19:12:05
I prefer keeping the public api clean. Instead of
Michael K. (Yandex Team)
2017/03/03 08:26:37
Done.
|
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(TabLoaderTest, OnMemoryStateChange); |
@@ -144,6 +149,9 @@ class TabLoader : public content::NotificationObserver, |
// The tabs we need to load. |
TabsToLoad tabs_to_load_; |
+ // The number of tabs started to load. |
sky
2017/03/02 19:12:05
Document this value never decreases.
Michael K. (Yandex Team)
2017/03/03 08:26:37
Done.
|
+ size_t started_to_load_count_; |
+ |
base::OneShotTimer force_load_timer_; |
// The time the restore process started. |