1 // Copyright 2020 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.
5 #ifndef COMPONENTS_METRICS_ENTROPY_STATE_PROVIDER_H_
6 #define COMPONENTS_METRICS_ENTROPY_STATE_PROVIDER_H_
8 #include "components/metrics/entropy_state.h"
9 #include "components/metrics/metrics_provider.h"
15 // EntropyStateProvider adds information about low entropy sources in the system
16 // profile. This includes |low_entropy_source|, |old_low_entropy_source| and
17 // |pseudo_low_entropy_source|.
18 class EntropyStateProvider : public MetricsProvider {
20 explicit EntropyStateProvider(PrefService* local_state);
21 ~EntropyStateProvider() override;
23 EntropyStateProvider(const EntropyStateProvider&) = delete;
24 EntropyStateProvider& operator=(const EntropyStateProvider&) = delete;
26 // Provides low entropy sources values to system profile in the client's
27 // report. This function always provides the same low entropy source values
28 // that are used for randomizing field trials throughout the session.
29 void ProvideSystemProfileMetrics(
30 SystemProfileProto* system_profile_proto) override;
33 EntropyState entropy_state_;
36 } // namespace metrics
38 #endif // COMPONENTS_METRICS_ENTROPY_STATE_PROVIDER_H_