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 // Determines at what point the metrics service is allowed to close a log when 13 // Chrome is closed (and backgrounded/foregrounded for mobile platforms). When 14 // this feature is disabled, the metrics service can only close a log if it has 15 // already started sending logs. When this feature is enabled, the metrics 16 // service can close a log starting from when the first log is opened. 17 BASE_DECLARE_FEATURE(kMetricsServiceAllowEarlyLogClose); 18 19 // Determines whether logs stored in Local State are cleared when the Chrome 20 // install is detected as cloned. 21 BASE_DECLARE_FEATURE(kMetricsClearLogsOnClonedInstall); 22 23 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) 24 // Determines whether we immediately flush Local State after uploading a log 25 // while Chrome is in the background. Only applicable for mobile platforms. 26 BASE_DECLARE_FEATURE(kReportingServiceFlushPrefsOnUploadInBackground); 27 #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) 28 } // namespace metrics::features 29 30 #endif // COMPONENTS_METRICS_METRICS_FEATURES_H_