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

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

Issue 1059343002: Add experiment to disable loading of background tabs during session restore. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix metrics by keeping right number of tabs restored. Created 5 years, 9 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/session_restore_stats_collector.h
diff --git a/chrome/browser/sessions/session_restore_stats_collector.h b/chrome/browser/sessions/session_restore_stats_collector.h
index c312b404383a4530c356063b8acd35f0cd2ed9fd..24c622964e9598029c803c55bef83c6a2d7cb995 100644
--- a/chrome/browser/sessions/session_restore_stats_collector.h
+++ b/chrome/browser/sessions/session_restore_stats_collector.h
@@ -28,14 +28,16 @@ class SessionRestoreStatsCollector
// are added to the existing list of tracked tabs.
static void TrackTabs(
const std::vector<SessionRestoreDelegate::RestoredTab>& tabs,
- const base::TimeTicks& restore_started);
+ const base::TimeTicks& restore_started,
+ bool active_only);
private:
friend class base::RefCounted<SessionRestoreStatsCollector>;
using RenderWidgetHostSet = std::set<content::RenderWidgetHost*>;
- explicit SessionRestoreStatsCollector(const base::TimeTicks& restore_started);
+ explicit SessionRestoreStatsCollector(const base::TimeTicks& restore_started,
+ bool active_only);
~SessionRestoreStatsCollector() override;
// NotificationObserver method.
@@ -83,6 +85,9 @@ class SessionRestoreStatsCollector
// Notification registrar.
content::NotificationRegistrar registrar_;
+ // Are we only restoring active tabs?
+ bool active_only_;
+
// To keep the collector alive as long as needed.
scoped_refptr<SessionRestoreStatsCollector> this_retainer_;

Powered by Google App Engine
This is Rietveld 408576698