A tab that doesn't start visible has an initial LifecycleUnit::GetLastVisibleTime() equal to zero, which makes it immediately eligible for proactive freezing and discarding. This is problematic, because it means that with the ProactiveTabFreezeAndDiscard experiment, restored tabs and tabs opened in the background effectively do not load until they are accessed.
We need to fix these 2 issues:
- When a tab is opened in the background, we should use its opening time instead of a zero TimeTicks() as its last active time for proactive freeze and discard.
- When a tab is restored, we should use a restored last active time.
Comment 1 by bugdroid1@chromium.org
, Jun 19 2018