Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc |
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc |
index abdbe4bd60e623134369db81ff2249744cc6cdaf..ff30a18f383ea12edb9ae28d0ad7a6c541765d15 100644 |
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc |
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
#include "chrome/browser/browser_process.h" |
+#include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
@@ -34,7 +35,17 @@ void DataReductionProxyChromeSettings::InitDataReductionProxySettings( |
prefs, |
g_browser_process->local_state(), |
ProfileManager::GetActiveUserProfile()->GetRequestContext()); |
+ DataReductionProxySettings::SetOnDataReductionEnabledCallback( |
+ base::Bind(&DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial, |
+ base::Unretained(this))); |
SetDataReductionProxyAlternativeEnabled( |
DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()); |
} |
+ |
+void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( |
+ bool data_reduction_proxy_enabled) { |
+ ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( |
+ "DataReductionProxyEnabled", |
+ data_reduction_proxy_enabled ? "true" : "false"); |
+} |