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

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

Issue 893003002: Data Reduction Proxy class ownership updates and Settings cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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_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,

Powered by Google App Engine
This is Rietveld 408576698