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

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: typedef for callback type 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..595980337c622f0612745b5cb33b2d67af34b39b 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"
@@ -217,7 +218,10 @@ void MetricsStateManager::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterIntegerPref(prefs::kMetricsOldLowEntropySource, 0);
}
+// TODO(gayane): Eliminate use of ScopedAllowIO. crbug.com/13783
Alexei Svitkine (slow) 2014/09/12 17:51:52 Nit: Put this comment inside the function above th
gayane -on leave until 09-2017 2014/09/12 18:20:12 Done.
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