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 319969e93278ce17df64dbdcacf5f94cac289c8b..c70e5819e11b7c02cf90150b29d84e1adeff6ad0 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 |
@@ -4,10 +4,12 @@ |
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" |
+#include "base/prefs/pref_service.h" |
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
#include "chrome/common/chrome_content_client.h" |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h" |
#if defined(OS_ANDROID) |
#include "base/android/build_info.h" |
@@ -49,12 +51,16 @@ CreateDataReductionProxyChromeIOData( |
} |
#endif |
+ bool enabled = prefs->GetBoolean( |
+ data_reduction_proxy::prefs::kDataReductionProxyEnabled) || |
+ data_reduction_proxy::DataReductionProxyParams:: |
+ ShouldForceEnableDataReductionProxy(); |
scoped_ptr<data_reduction_proxy::DataReductionProxyIOData> |
data_reduction_proxy_io_data( |
new data_reduction_proxy::DataReductionProxyIOData( |
DataReductionProxyChromeSettings::GetClient(), flags, net_log, |
- io_task_runner, ui_task_runner, enable_quic, GetUserAgent())); |
- data_reduction_proxy_io_data->InitOnUIThread(prefs); |
+ io_task_runner, ui_task_runner, enabled, enable_quic, |
+ GetUserAgent())); |
#if defined(ENABLE_DATA_REDUCTION_PROXY_DEBUGGING) |
scoped_ptr<data_reduction_proxy::ContentDataReductionProxyDebugUIService> |