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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc

Issue 1400903002: Data reduction proxy enabled/disabled UMA for all platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tbansal1 comments Created 5 years, 2 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/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
index 19f3e25b4d888ffbdec22acebb538a68a0f5dd21..6d62e64a46fb1f1614588c8af9bd1b572b31ad3b 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
@@ -24,6 +24,13 @@ namespace {
const char kUMAProxyStartupStateHistogram[] =
"DataReductionProxy.StartupState";
+void RecordSettingsEnabledState(
+ data_reduction_proxy::DataReductionSettingsEnabledAction action) {
+ UMA_HISTOGRAM_ENUMERATION(
+ "DataReductionProxy.EnabledState", action,
+ data_reduction_proxy::DATA_REDUCTION_SETTINGS_ACTION_BOUNDARY);
+}
+
} // namespace
namespace data_reduction_proxy {
@@ -254,6 +261,12 @@ void DataReductionProxySettings::MaybeActivateDataReductionProxy(
prefs->SetBoolean(prefs::kDataReductionProxyWasEnabledBefore, true);
ResetDataReductionStatistics();
}
+ if (!at_startup) {
+ if (IsDataReductionProxyEnabled())
+ RecordSettingsEnabledState(DATA_REDUCTION_SETTINGS_ACTION_OFF_TO_ON);
+ else
+ RecordSettingsEnabledState(DATA_REDUCTION_SETTINGS_ACTION_ON_TO_OFF);
+ }
// Configure use of the data reduction proxy if it is enabled.
if (at_startup && !data_reduction_proxy_service_->Initialized())
deferred_initialization_ = true;

Powered by Google App Engine
This is Rietveld 408576698