[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / components / metrics / metrics_features.h
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_METRICS_METRICS_FEATURES_H_
6 #define COMPONENTS_METRICS_METRICS_FEATURES_H_
7
8 #include "base/feature_list.h"
9 #include "base/metrics/field_trial_params.h"
10
11 namespace metrics::features {
12
13 // Determines at what point the metrics service is allowed to close a log when
14 // Chrome is closed (and backgrounded/foregrounded for mobile platforms). When
15 // this feature is disabled, the metrics service can only close a log if it has
16 // already started sending logs. When this feature is enabled, the metrics
17 // service can close a log starting from when the first log is opened.
18 BASE_DECLARE_FEATURE(kMetricsServiceAllowEarlyLogClose);
19
20 // This can be used to disable structured metrics as a whole.
21 BASE_DECLARE_FEATURE(kStructuredMetrics);
22
23 #if BUILDFLAG(IS_ANDROID)
24 // Determines whether to merge histograms from child processes when Chrome is
25 // backgrounded/foregrounded. Only on Android.
26 BASE_DECLARE_FEATURE(kMergeSubprocessMetricsOnBgAndFg);
27 #endif  // BUILDFLAG(IS_ANDROID)
28
29 // Determines whether to allow merging subprocess metrics asynchronously. By
30 // itself, the feature does nothing. But the different params below allow
31 // toggling specific async behaviours.
32 BASE_DECLARE_FEATURE(kSubprocessMetricsAsync);
33 // Determines whether to merge subprocess metrics asynchronously when creating
34 // periodic ongoing UMA logs.
35 extern const base::FeatureParam<bool> kPeriodicMergeAsync;
36 // Determines whether to merge the last metrics of a subprocess that has just
37 // exited asynchronously.
38 extern const base::FeatureParam<bool> kDeregisterAsync;
39 // Determines whether the tasks posted when deregistering a subprocess
40 // asynchronously are sequenced. This param only applies when |kDeregisterAsync|
41 // is true.
42 extern const base::FeatureParam<bool> kDeregisterSequenced;
43
44 // Determines whether to schedule a flush of persistent histogram memory
45 // immediately after writing a system profile to it.
46 BASE_DECLARE_FEATURE(kFlushPersistentSystemProfileOnWrite);
47
48 // Determines whether to perform histogram delta snapshots in a background
49 // thread (in contrast to snapshotting unlogged samples in the background, then
50 // marking them as logged on the main thread).
51 BASE_DECLARE_FEATURE(kMetricsServiceDeltaSnapshotInBg);
52
53 // Determines whether to always flush Local State immediately after an UMA/UKM
54 // log upload. If this is disabled, Local State is only immediately flushed
55 // after an upload if this is a mobile platform and the browser is in the
56 // background.
57 BASE_DECLARE_FEATURE(kReportingServiceAlwaysFlush);
58
59 }  // namespace metrics::features
60
61 #endif  // COMPONENTS_METRICS_METRICS_FEATURES_H_