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

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

Issue 1137033004: [Session restore] Add DontRestoreBackgroundTabs group to collect stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change experiment name to the new/correct one. 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
« no previous file with comments | « chrome/browser/sessions/session_restore_stats_collector.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_stats_collector.cc
diff --git a/chrome/browser/sessions/session_restore_stats_collector.cc b/chrome/browser/sessions/session_restore_stats_collector.cc
index f593b6eb299186711d4b4546b118c676c3f6413b..f892d1ad107b4bdbb27b03cb5d161c475de593a2 100644
--- a/chrome/browser/sessions/session_restore_stats_collector.cc
+++ b/chrome/browser/sessions/session_restore_stats_collector.cc
@@ -27,6 +27,21 @@ void SessionRestoreStatsCollector::TrackTabs(
shared_collector_->AddTabs(tabs);
}
+// static
+void SessionRestoreStatsCollector::TrackActiveTabs(
+ const std::vector<SessionRestoreDelegate::RestoredTab>& tabs,
+ const base::TimeTicks& restore_started) {
+ if (!shared_collector_)
+ shared_collector_ = new SessionRestoreStatsCollector(restore_started);
+
+ std::vector<SessionRestoreDelegate::RestoredTab> active_tabs;
+ for (auto tab : tabs) {
+ if (tab.is_active())
+ active_tabs.push_back(tab);
+ }
+ shared_collector_->AddTabs(active_tabs);
+}
+
SessionRestoreStatsCollector::SessionRestoreStatsCollector(
const base::TimeTicks& restore_started)
: got_first_foreground_load_(false),
« no previous file with comments | « chrome/browser/sessions/session_restore_stats_collector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698