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

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: fix for trybot components_unittests failure 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..df934169add94f7572cc7396d973d0160da49649 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
@@ -254,6 +254,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;
@@ -289,6 +295,12 @@ void DataReductionProxySettings::RecordStartupState(ProxyStartupState state) {
PROXY_STARTUP_STATE_COUNT);
}
+void DataReductionProxySettings::RecordSettingsEnabledState(
sclittle 2015/10/09 20:52:48 It doesn't look like this function needs to be a m
Raj 2015/10/10 01:51:47 Done.
+ DataReductionSettingsEnabledAction action) {
+ UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.EnabledState", action,
+ DATA_REDUCTION_SETTINGS_ACTION_BOUNDARY);
+}
+
void DataReductionProxySettings::RecordLoFiImplicitOptOutAction(
LoFiImplicitOptOutAction action) const {
net::NetworkChangeNotifier::ConnectionType connection_type =

Powered by Google App Engine
This is Rietveld 408576698