Index: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc |
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc |
index 81b669fffebeea116ca08b0e936ce33aed14f864..82ae7acb2dc6c9668a9e70aa2651ff64ccd2c899 100644 |
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc |
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc |
@@ -13,11 +13,18 @@ |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h" |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
+ |
+#if defined(OS_ANDROID) |
+#include "base/android/build_info.h" |
+#endif |
namespace content { |
class BrowserContext; |
} |
+using data_reduction_proxy::DataReductionProxyParams; |
+ |
scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
CreateDataReductionProxyChromeIOData( |
net::NetLog* net_log, |
@@ -49,10 +56,25 @@ CreateDataReductionProxyChromeIOData( |
prefs, ui_task_runner, |
commit_delay); |
+ int flags = DataReductionProxyParams::kAllowed; |
+ flags |= DataReductionProxyParams::kFallbackAllowed | |
+ DataReductionProxyParams::kAlternativeAllowed; |
+ if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) |
+ flags |= DataReductionProxyParams::kPromoAllowed; |
+ if (DataReductionProxyParams::IsIncludedInHoldbackFieldTrial()) |
+ flags |= DataReductionProxyParams::kHoldback; |
+#if defined(OS_ANDROID) |
bengr
2015/02/05 00:46:02
This platform specialization will go away in a fut
jeremyim
2015/02/05 00:59:52
This specialization won't go away, since it's the
bengr
2015/02/05 01:35:11
Fine.
|
+ if (DataReductionProxyParams::IsIncludedInAndroidOnePromoFieldTrial( |
+ base::android::BuildInfo::GetInstance()->android_build_fp())) { |
+ flags |= DataReductionProxyParams::kPromoAllowed; |
+ } |
+#endif |
+ |
scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
data_reduction_proxy_io_data( |
new data_reduction_proxy::DataReductionProxyIOData( |
DataReductionProxyChromeSettings::GetClient(), |
+ flags, |
make_scoped_ptr(data_reduction_proxy_statistics_prefs), |
settings, |
net_log, |