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

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

Issue 1057473003: Remove BooleanPrefMember usage from Data Reduction Proxy IO classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr CR comments Created 5 years, 8 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 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>

Powered by Google App Engine
This is Rietveld 408576698