// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_METRICS_METRICS_STATE_MANAGER_H_ #define COMPONENTS_METRICS_METRICS_STATE_MANAGER_H_ #include <memory> #include <string> #include <string_view> #include "base/callback_list.h" #include "base/files/file_path.h" #include "base/functional/callback.h" #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/metrics/field_trial.h" #include "build/chromeos_buildflags.h" #include "components/metrics/clean_exit_beacon.h" #include "components/metrics/client_info.h" #include "components/metrics/cloned_install_detector.h" #include "components/metrics/entropy_state.h" #include "components/variations/entropy_provider.h" class PrefService; class PrefRegistrySimple; namespace metrics { class EnabledStateProvider; class MetricsProvider; // Denotes whether this session is a background or foreground session at // startup. May be unknown. A background session refers to the situation in // which the browser process starts; does some work, e.g. servicing a sync; and // ends without ever becoming visible. Note that the point in startup at which // this value is determined is likely before the UI is visible. // // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class StartupVisibility { … }; // Denotes the type of EntropyProvider to use for default one-time // randomization. enum class EntropyProviderType { … }; // Options to apply to trial randomization. struct EntropyParams { … }; // Responsible for managing MetricsService state prefs, specifically the UMA // client id and low entropy source. Code outside the metrics directory should // not be instantiating or using this class directly. class MetricsStateManager final { … }; } // namespace metrics #endif // COMPONENTS_METRICS_METRICS_STATE_MANAGER_H_