#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"
if (IsMetricsReportingEnabled()) {
if (entropy_source_returned_ == ENTROPY_SOURCE_NONE)
entropy_source_returned_ = ENTROPY_SOURCE_HIGH;
- DCHECK_EQ(ENTROPY_SOURCE_HIGH, entropy_source_returned_);
const std::string high_entropy_source =
client_id_ + base::IntToString(low_entropy_source_value);
return scoped_ptr<const base::FieldTrial::EntropyProvider>(
if (entropy_source_returned_ == ENTROPY_SOURCE_NONE)
entropy_source_returned_ = ENTROPY_SOURCE_LOW;
- DCHECK_EQ(ENTROPY_SOURCE_LOW, entropy_source_returned_);
#if defined(OS_ANDROID) || defined(OS_IOS)
return scoped_ptr<const base::FieldTrial::EntropyProvider>(
}
void MetricsStateManager::BackUpCurrentClientInfo() {
+ // TODO(gayane): Eliminate use of ScopedAllowIO. crbug.com/413783
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+
ClientInfo client_info;
client_info.client_id = client_id_;
client_info.installation_date = local_state_->GetInt64(prefs::kInstallDate);