diff options
author | Gayane Petrosyan <gayane@chromium.org> | 2014-09-16 15:25:08 -0400 |
---|---|---|
committer | Alexei Svitkine <asvitkine@chromium.org> | 2014-09-16 19:27:36 +0000 |
commit | 9f044063e9d771aae5995b6bb9894480e8c292e4 (patch) | |
tree | b0058053e7dba0def52a3dec0206abad35730507 /components | |
parent | 8cc4ec76a0588a3f1fbb89f033cf0b919233ac86 (diff) | |
download | chromium_src-9f044063e9d771aae5995b6bb9894480e8c292e4.zip chromium_src-9f044063e9d771aae5995b6bb9894480e8c292e4.tar.gz chromium_src-9f044063e9d771aae5995b6bb9894480e8c292e4.tar.bz2 |
Consolidates accessing and setting the UMA pref
to be within metrics code
MetricsReportingEnabled checkbox changed code refactored for not-chromeos:
-prefs removed from HTML
-Handler and callback functions added to core_options_handler
-Major refactoring in metrics_reporting_state
-Simple histogram added in metrics_reporting_state without distinguishing the source of the change
-browser_options_handler changed to handle new way of forcing company policies of disabling the checkbox
BUG=401233
NOPRESUBMIT=true
R=asvitkine@chromium.org
Review URL: https://codereview.chromium.org/506663003
Patch from Gayane Petrosyan <gayane@chromium.org>.
Cr-Commit-Position: refs/heads/master@{#295124}
Diffstat (limited to 'components')
-rw-r--r-- | components/metrics/metrics_state_manager.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/metrics/metrics_state_manager.cc b/components/metrics/metrics_state_manager.cc index 9baa790..7f7b8e5 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,9 @@ void MetricsStateManager::RegisterPrefs(PrefRegistrySimple* registry) { } 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); |