| 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;
|
|
|