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

Unified Diff: chrome/browser/sessions/tab_loader.h

Issue 2727663004: Use TabLoader in TabRestoreService. (Closed)
Patch Set: Created 3 years, 10 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/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.
« no previous file with comments | « no previous file | chrome/browser/sessions/tab_loader.cc » ('j') | chrome/browser/sessions/tab_restore_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698