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

Unified Diff: components/metrics/metrics_state_manager.cc

Issue 506663003: Consolidates accessing and setting the UMA pref to be within metrics code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor changes and fixes Created 6 years, 3 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
Index: components/metrics/metrics_state_manager.cc
diff --git a/components/metrics/metrics_state_manager.cc b/components/metrics/metrics_state_manager.cc
index 9baa790918b4168ced4ce75d7341c0b1266a5ece..5a16ba3a0d2846765c98d7b0afa15806c0701ae1 100644
--- a/components/metrics/metrics_state_manager.cc
+++ b/components/metrics/metrics_state_manager.cc
@@ -12,6 +12,7 @@
#include "base/prefs/pref_service.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "components/metrics/cloned_install_detector.h"
#include "components/metrics/machine_id_provider.h"
@@ -218,6 +219,8 @@ void MetricsStateManager::RegisterPrefs(PrefRegistrySimple* registry) {
}
void MetricsStateManager::BackUpCurrentClientInfo() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
ClientInfo client_info;
client_info.client_id = client_id_;
client_info.installation_date = local_state_->GetInt64(prefs::kInstallDate);

Powered by Google App Engine
This is Rietveld 408576698