Commit fa5ebed3 authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

Allow urgent discarding of tabs sharing a browsing instance

This protection should only apply to the proactive discarding scenario.

Change-Id: I081422d406dce2eef2a9e56f03bce50c7038a14d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1857042Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705983}
parent 0ea9325e
......@@ -979,6 +979,7 @@ void TabLifecycleUnitSource::TabLifecycleUnit::CheckIfTabIsUsedInBackground(
// Do not freeze tabs that are casting/mirroring/playing audio.
IsMediaTabImpl(decision_details);
if (intervention_type == InterventionType::kProactive) {
if (GetStaticProactiveTabFreezeAndDiscardParams()
.should_protect_tabs_sharing_browsing_instance) {
if (web_contents()->GetSiteInstance()->GetRelatedActiveContentsCount() >
......@@ -988,11 +989,10 @@ void TabLifecycleUnitSource::TabLifecycleUnit::CheckIfTabIsUsedInBackground(
}
}
// Consult the local database to see if this tab could try to communicate with
// the user while in background (don't check for the visibility here as
// Consult the local database to see if this tab could try to communicate
// with the user while in background (don't check for the visibility here as
// there's already a check for that above). Only do this for proactive
// interventions.
if (intervention_type == InterventionType::kProactive) {
CheckIfTabCanCommunicateWithUserWhileInBackground(web_contents(),
decision_details);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment