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

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: Add comment about |active_tabs|. 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
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..d166f845a1dc3110b8df72cac1f452e971658bc0 100644
--- a/chrome/browser/sessions/session_restore_stats_collector.h
+++ b/chrome/browser/sessions/session_restore_stats_collector.h
@@ -25,10 +25,13 @@ class SessionRestoreStatsCollector
public base::RefCounted<SessionRestoreStatsCollector> {
public:
// Called to start tracking tabs. If a restore is already occuring, the tabs
- // are added to the existing list of tracked tabs.
+ // are added to the existing list of tracked tabs. If |active_only| is true,
+ // only tabs that are marked as active will be tracked (for example when
+ // background tabs are not loaded during session restore).
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>;
@@ -43,8 +46,11 @@ class SessionRestoreStatsCollector
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
- // Adds new tabs to the list of tracked tabs.
- void AddTabs(const std::vector<SessionRestoreDelegate::RestoredTab>& tabs);
+ // Adds new tabs to the list of tracked tabs. If |active_only| is true,
+ // only tabs that are marked as active will be tracked (for example when
+ // background tabs are not loaded during session restore).
+ void AddTabs(const std::vector<SessionRestoreDelegate::RestoredTab>& tabs,
+ bool active_only);
// Called when a tab is no longer tracked.
void RemoveTab(content::NavigationController* tab);
« no previous file with comments | « chrome/browser/sessions/session_restore_delegate.cc ('k') | chrome/browser/sessions/session_restore_stats_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698