chromium/components/performance_manager/features.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This header contains field trial and variations definitions for policies,
// mechanisms and features in the performance_manager component.

#include "components/performance_manager/public/features.h"

#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"

namespace performance_manager::features {

BASE_FEATURE();

#if !BUILDFLAG(IS_ANDROID)
BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

// The variable was renamed to "MemorySaver" but the experiment name remains as
// "HighEfficiency" because it is already running (crbug.com/1493843).
BASE_FEATURE();

BASE_FEATURE();

const base::FeatureParam<base::TimeDelta>
    kPerformanceControlsBatterySurveyLookback{};

#if BUILDFLAG(IS_WIN)
BASE_FEATURE(kPrefetchVirtualMemoryPolicy,
             "PrefetchVirtualMemoryPolicy",
             base::FEATURE_DISABLED_BY_DEFAULT);
#endif

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

bool ShouldUsePerformanceInterventionBackend() {}

const base::FeatureParam<int> kInterventionDialogStringVersion{};

const base::FeatureParam<bool> kInterventionShowMixedProfileSuggestions{};

const base::FeatureParam<base::TimeDelta> kInterventionButtonTimeout{};

const base::FeatureParam<base::TimeDelta> kCPUTimeOverThreshold{};
const base::FeatureParam<base::TimeDelta> kCPUSampleFrequency{};

const base::FeatureParam<int> kCPUDegradedHealthPercentageThreshold{};
const base::FeatureParam<int> kCPUUnhealthyPercentageThreshold{};

const base::FeatureParam<int> kCPUMaxActionableTabs{};

const base::FeatureParam<int> kMinimumActionableTabCPUPercentage{};

const base::FeatureParam<base::TimeDelta> kMemoryTimeOverThreshold{};

const base::FeatureParam<int> kMemoryFreePercentThreshold{};
const base::FeatureParam<int> kMemoryFreeBytesThreshold{};

#if BUILDFLAG(IS_CHROMEOS)
BASE_FEATURE(kUnthrottledTabProcessReporting,
             "UnthrottledTabProcessReporting",
             base::FEATURE_DISABLED_BY_DEFAULT);
#endif  // BUILDFLAG(IS_CHROMEOS)

#endif

BASE_FEATURE();

const base::FeatureParam<bool> kInheritParentPriority{};

const base::FeatureParam<bool> kDownvoteAdFrames{};

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

const base::FeatureParam<base::TimeDelta> kDelayBeforeLogging{};

const base::FeatureParam<int> kThresholdChromeCPUPercent{};

BASE_FEATURE();

// Note: This param is associated with `kCPUMeasurementInFreezingPolicy` instead
// of `kFreezingOnBatterySaver`, to allow retrieving the value without
// activating the `kFreezingOnBatterySaver` feature.
const base::FeatureParam<double> kFreezingOnBatterySaverHighCPUProportion{};

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

}  // namespace performance_manager::features