Commit 13d6e370 authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Commit Bot

[PM] Make sure that PageDiscardingHelper is created when needed.

Bug: 1128995
Change-Id: I9bc59f6b4a4af4df0850175826050e2e84381ae5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432385Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811917}
parent 244e9af8
......@@ -112,11 +112,21 @@ void ChromeBrowserMainExtraPartsPerformanceManager::CreatePoliciesAndDecorators(
#if !defined(OS_ANDROID)
graph->PassToGraph(FormInteractionTabHelper::CreateGraphObserver());
// The PageDiscardingHelper instance is required by the HighPMFDiscardPolicy
// and by UrgentDiscardingFromPerformanceManager.
if (base::FeatureList::IsEnabled(
performance_manager::features::kHighPMFDiscardPolicy) ||
base::FeatureList::IsEnabled(
performance_manager::features::
kUrgentDiscardingFromPerformanceManager)) {
graph->PassToGraph(std::make_unique<
performance_manager::policies::PageDiscardingHelper>());
}
if (base::FeatureList::IsEnabled(
performance_manager::features::
kUrgentDiscardingFromPerformanceManager)) {
graph->PassToGraph(
std::make_unique<
performance_manager::policies::UrgentPageDiscardingPolicy>());
......
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