Commit 2ce46749 authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

Stop reading the "MinimumProtectionTime" param of the "AutomaticTabDiscarding" field trial.

The "MinimumProtectionTime" field trial has expired. Not having
to read the "AllowMultipleDiscards" param of this field trial will
simplify the TabManager refactor.

Bug: 775644
Change-Id: Ide53247821bc9753fe8d6ba27614d3591384cbed
Reviewed-on: https://chromium-review.googlesource.com/771545
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517459}
parent 6e3de121
......@@ -255,22 +255,6 @@ void TabManager::Start() {
// TODO(georgesak): remote this when deemed not needed anymore.
if (!base::FeatureList::IsEnabled(features::kAutomaticTabDiscarding))
return;
// Check the variation parameter to see if a tab is to be protected for an
// amount of time after being backgrounded. The value is in seconds. Default
// is 10 minutes if the variation is absent.
std::string minimum_protection_time_string =
variations::GetVariationParamValue(features::kAutomaticTabDiscarding.name,
"MinimumProtectionTime");
if (!minimum_protection_time_string.empty()) {
unsigned int minimum_protection_time_seconds = 0;
if (base::StringToUint(minimum_protection_time_string,
&minimum_protection_time_seconds)) {
if (minimum_protection_time_seconds > 0)
minimum_protection_time_ =
base::TimeDelta::FromSeconds(minimum_protection_time_seconds);
}
}
#endif
// Check if only one discard is allowed.
......
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