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

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

Issue 1130673003: Make session restore forced tab load delay Finch configurable, and separate first tab loads from su… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now actually compiles! Created 5 years, 7 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.cc
diff --git a/chrome/browser/sessions/tab_loader.cc b/chrome/browser/sessions/tab_loader.cc
index bf1b00a0258d2b777399dc95c5984891bc02b319..98226b717633683458e3e6a51d82a1e221f9be37 100644
--- a/chrome/browser/sessions/tab_loader.cc
+++ b/chrome/browser/sessions/tab_loader.cc
@@ -117,7 +117,7 @@ void TabLoader::StartLoading(const std::vector<RestoredTab>& tabs) {
delegate_ = TabLoaderDelegate::Create(this);
// There is already at least one tab loading (the active tab). As such we
// only have to start the timeout timer here.
- StartTimer();
+ StartFirstTimer();
}
}
@@ -152,6 +152,13 @@ void TabLoader::LoadNextTab() {
StartTimer();
}
+void TabLoader::StartFirstTimer() {
+ force_load_timer_.Stop();
gab 2015/05/15 18:21:02 Looks like Start() already takes care of stopping
chrisha 2015/05/15 18:47:12 Acknowledged.
+ force_load_timer_.Start(FROM_HERE,
+ delegate_->GetFirstTabLoadingTimeout(),
+ this, &TabLoader::ForceLoadTimerFired);
+}
+
void TabLoader::StartTimer() {
force_load_timer_.Stop();
force_load_timer_.Start(FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698