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

Unified Diff: components/metrics/metrics_state_manager.cc

Issue 1161133004: Delete code corresponding to old UMA prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moar comments. Created 5 years, 7 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_pref_names.cc ('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 477751bd8894fe6fc418e5ee5fae82a00abc9784..fdb972f75a8ebcbaa96ac89e603a87ea967a8825 100644
--- a/components/metrics/metrics_state_manager.cc
+++ b/components/metrics/metrics_state_manager.cc
@@ -124,14 +124,9 @@ void MetricsStateManager::ForceClientIdCreation() {
client_id_ = base::GenerateGUID();
local_state_->SetString(prefs::kMetricsClientID, client_id_);
- if (local_state_->GetString(prefs::kMetricsOldClientID).empty()) {
- // Record the timestamp of when the user opted in to UMA.
- local_state_->SetInt64(prefs::kMetricsReportingEnabledTimestamp,
- base::Time::Now().ToTimeT());
- } else {
- UMA_HISTOGRAM_BOOLEAN("UMA.ClientIdMigrated", true);
- }
- local_state_->ClearPref(prefs::kMetricsOldClientID);
+ // Record the timestamp of when the user opted in to UMA.
+ local_state_->SetInt64(prefs::kMetricsReportingEnabledTimestamp,
+ base::Time::Now().ToTimeT());
BackUpCurrentClientInfo();
}
@@ -208,11 +203,6 @@ void MetricsStateManager::RegisterPrefs(PrefRegistrySimple* registry) {
ClonedInstallDetector::RegisterPrefs(registry);
CachingPermutedEntropyProvider::RegisterPrefs(registry);
-
- // TODO(asvitkine): Remove these once a couple of releases have passed.
- // http://crbug.com/357704
- registry->RegisterStringPref(prefs::kMetricsOldClientID, std::string());
- registry->RegisterIntegerPref(prefs::kMetricsOldLowEntropySource, 0);
}
void MetricsStateManager::BackUpCurrentClientInfo() {
@@ -283,7 +273,6 @@ int MetricsStateManager::GetLowEntropySource() {
low_entropy_source_ = GenerateLowEntropySource();
local_state_->SetInteger(prefs::kMetricsLowEntropySource,
low_entropy_source_);
- local_state_->ClearPref(prefs::kMetricsOldLowEntropySource);
CachingPermutedEntropyProvider::ClearCache(local_state_);
return low_entropy_source_;
« no previous file with comments | « components/metrics/metrics_pref_names.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698