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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc

Issue 421653005: Adding synthetic field trial for DataReductionProxyEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newPltWithCL
Patch Set: indent fixed Created 6 years, 5 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: 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");
+}

Powered by Google App Engine
This is Rietveld 408576698