• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "components/metrics/entropy_state_provider.h"
6 
7 #include "third_party/metrics_proto/system_profile.pb.h"
8 
9 namespace metrics {
10 
EntropyStateProvider(PrefService * local_state)11 EntropyStateProvider::EntropyStateProvider(PrefService* local_state)
12     : entropy_state_(local_state) {}
13 
14 EntropyStateProvider::~EntropyStateProvider() = default;
15 
ProvideSystemProfileMetrics(SystemProfileProto * system_profile)16 void EntropyStateProvider::ProvideSystemProfileMetrics(
17     SystemProfileProto* system_profile) {
18   system_profile->set_low_entropy_source(entropy_state_.GetLowEntropySource());
19   system_profile->set_old_low_entropy_source(
20       entropy_state_.GetOldLowEntropySource());
21   system_profile->set_pseudo_low_entropy_source(
22       entropy_state_.GetPseudoLowEntropySource());
23 }
24 
25 }  // namespace metrics
26