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

Unified Diff: components/metrics/metrics_state_manager.cc

Issue 1284433003: [UMA, Cleanup] Deprecate the UMA.GeneratedLowEntropySource histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update enum labels in histograms.xml Created 5 years, 4 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 | « components/metrics/metrics_state_manager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_state_manager.cc
diff --git a/components/metrics/metrics_state_manager.cc b/components/metrics/metrics_state_manager.cc
index 319311576ecab943f531455e8d90f59c665fb9c9..4330839e2af0d6c7ae5bcc8393b65d68d2af8ca8 100644
--- a/components/metrics/metrics_state_manager.cc
+++ b/components/metrics/metrics_state_manager.cc
@@ -248,11 +248,16 @@ scoped_ptr<ClientInfo> MetricsStateManager::LoadClientInfoAndMaybeMigrate() {
}
int MetricsStateManager::GetLowEntropySource() {
+ UpdateLowEntropySource();
+ return low_entropy_source_;
+}
+
+void MetricsStateManager::UpdateLowEntropySource() {
// Note that the default value for the low entropy source and the default pref
// value are both kLowEntropySourceNotSet, which is used to identify if the
// value has been set or not.
if (low_entropy_source_ != kLowEntropySourceNotSet)
- return low_entropy_source_;
+ return;
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
// Only try to load the value from prefs if the user did not request a
@@ -264,18 +269,14 @@ int MetricsStateManager::GetLowEntropySource() {
// it below.
if (value >= 0 && value < kMaxLowEntropySize) {
low_entropy_source_ = value;
- UMA_HISTOGRAM_BOOLEAN("UMA.GeneratedLowEntropySource", false);
- return low_entropy_source_;
+ return;
}
}
- UMA_HISTOGRAM_BOOLEAN("UMA.GeneratedLowEntropySource", true);
low_entropy_source_ = GenerateLowEntropySource();
local_state_->SetInteger(prefs::kMetricsLowEntropySource,
low_entropy_source_);
CachingPermutedEntropyProvider::ClearCache(local_state_);
-
- return low_entropy_source_;
}
void MetricsStateManager::UpdateEntropySourceReturnedValue(
« no previous file with comments | « components/metrics/metrics_state_manager.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698