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

Unified Diff: components/metrics/metrics_state_manager.h

Issue 945603003: Add a histogram to debug metrics entropy source use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/metrics/metrics_state_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_state_manager.h
diff --git a/components/metrics/metrics_state_manager.h b/components/metrics/metrics_state_manager.h
index 30b6285a6a3f1e8efa2ffd3e420ff75120355ad1..041831c52fbbf0587b51427d210ef8e962909980 100644
--- a/components/metrics/metrics_state_manager.h
+++ b/components/metrics/metrics_state_manager.h
@@ -90,6 +90,7 @@ class MetricsStateManager {
ENTROPY_SOURCE_NONE,
ENTROPY_SOURCE_LOW,
ENTROPY_SOURCE_HIGH,
+ ENTROPY_SOURCE_ENUM_SIZE,
};
// Creates the MetricsStateManager with the given |local_state|. Calls
@@ -116,6 +117,10 @@ class MetricsStateManager {
// generate the entropy source value if it has not been called before.
int GetLowEntropySource();
+ // Updates |entropy_source_returned_| with |type| iff the current value is
+ // ENTROPY_SOURCE_NONE and logs the new value in a histogram.
+ void UpdateEntropySourceReturnedValue(EntropySourceType type);
+
// Returns the first entropy source that was returned by this service since
// start up, or NONE if neither was returned yet. This is exposed for testing
// only.
« no previous file with comments | « no previous file | components/metrics/metrics_state_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698