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

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

Issue 1087063003: [Session restore] Expose lazy mode and fix browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky@ review. Created 5 years, 8 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
« no previous file with comments | « chrome/browser/sessions/session_restore_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore_delegate.cc
diff --git a/chrome/browser/sessions/session_restore_delegate.cc b/chrome/browser/sessions/session_restore_delegate.cc
index d409d38a66c6c9265c21e61a175586057a609446..39be456ad2bbf5c52c630fb63b4f2e557f3e7376 100644
--- a/chrome/browser/sessions/session_restore_delegate.cc
+++ b/chrome/browser/sessions/session_restore_delegate.cc
@@ -10,17 +10,12 @@
#include "components/favicon/content/content_favicon_driver.h"
// static
-void SessionRestoreDelegate::RestoreTabs(
- const std::vector<RestoredTab>& tabs,
- const base::TimeTicks& restore_started) {
- // TODO(georgesak): make tests aware of that behavior so that they succeed if
- // tab loading is disabled.
- base::FieldTrial* trial =
- base::FieldTrialList::Find("SessionRestoreBackgroundLoading");
- bool active_only = true;
- if (!trial || trial->group_name() == "Restore") {
+void SessionRestoreDelegate::RestoreTabs(const std::vector<RestoredTab>& tabs,
+ const base::TimeTicks& restore_started,
+ bool active_only) {
+ SessionRestoreStatsCollector::TrackTabs(tabs, restore_started, active_only);
+ if (!active_only) {
TabLoader::RestoreTabs(tabs, restore_started);
- active_only = false;
} else {
// If we are not loading inactive tabs, restore their favicons (title has
// already been set by now).
@@ -32,5 +27,4 @@ void SessionRestoreDelegate::RestoreTabs(
}
}
}
- SessionRestoreStatsCollector::TrackTabs(tabs, restore_started, active_only);
}
« no previous file with comments | « chrome/browser/sessions/session_restore_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698