Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: components/metrics/metrics_state_manager.cc

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/metrics/metrics_state_manager.h" 5 #include "components/metrics/metrics_state_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/metrics/sparse_histogram.h" 12 #include "base/metrics/sparse_histogram.h"
13 #include "base/prefs/pref_registry_simple.h"
14 #include "base/prefs/pref_service.h"
15 #include "base/rand_util.h" 13 #include "base/rand_util.h"
16 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
17 #include "base/threading/thread_restrictions.h" 15 #include "base/threading/thread_restrictions.h"
18 #include "base/time/time.h" 16 #include "base/time/time.h"
19 #include "build/build_config.h" 17 #include "build/build_config.h"
20 #include "components/metrics/cloned_install_detector.h" 18 #include "components/metrics/cloned_install_detector.h"
21 #include "components/metrics/machine_id_provider.h" 19 #include "components/metrics/machine_id_provider.h"
22 #include "components/metrics/metrics_pref_names.h" 20 #include "components/metrics/metrics_pref_names.h"
23 #include "components/metrics/metrics_switches.h" 21 #include "components/metrics/metrics_switches.h"
22 #include "components/prefs/pref_registry_simple.h"
23 #include "components/prefs/pref_service.h"
24 #include "components/variations/caching_permuted_entropy_provider.h" 24 #include "components/variations/caching_permuted_entropy_provider.h"
25 25
26 namespace metrics { 26 namespace metrics {
27 27
28 namespace { 28 namespace {
29 29
30 // The argument used to generate a non-identifying entropy source. We want no 30 // The argument used to generate a non-identifying entropy source. We want no
31 // more than 13 bits of entropy, so use this max to return a number in the range 31 // more than 13 bits of entropy, so use this max to return a number in the range
32 // [0, 7999] as the entropy source (12.97 bits of entropy). 32 // [0, 7999] as the entropy source (12.97 bits of entropy).
33 const int kMaxLowEntropySize = 8000; 33 const int kMaxLowEntropySize = 8000;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 local_state_->ClearPref(prefs::kMetricsClientID); 304 local_state_->ClearPref(prefs::kMetricsClientID);
305 local_state_->ClearPref(prefs::kMetricsLowEntropySource); 305 local_state_->ClearPref(prefs::kMetricsLowEntropySource);
306 local_state_->ClearPref(prefs::kMetricsResetIds); 306 local_state_->ClearPref(prefs::kMetricsResetIds);
307 307
308 // Also clear the backed up client info. 308 // Also clear the backed up client info.
309 store_client_info_.Run(ClientInfo()); 309 store_client_info_.Run(ClientInfo());
310 } 310 }
311 311
312 } // namespace metrics 312 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/metrics_service_unittest.cc ('k') | components/metrics/metrics_state_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698