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

Unified Diff: chrome/browser/io_thread.cc

Issue 734263003: Move data reduction proxy logic out of chrome and android webview network delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 32bc8146a03b27c5abe59108e7426992fa7c619e..3be3c3ca804de18044ca5782f86665ac2cf4607b 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -43,6 +43,7 @@
#include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth_request_handler.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
@@ -582,18 +583,22 @@ void IOThread::InitAsync() {
extension_event_router_forwarder_;
#endif
- ChromeNetworkDelegate* network_delegate =
+ scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate(
new ChromeNetworkDelegate(extension_event_router_forwarder(),
- &system_enable_referrers_);
+ &system_enable_referrers_));
if (command_line.HasSwitch(switches::kEnableClientHints))
- network_delegate->SetEnableClientHints();
+ chrome_network_delegate->SetEnableClientHints();
#if defined(ENABLE_EXTENSIONS)
if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling))
- network_delegate->NeverThrottleRequests();
+ chrome_network_delegate->NeverThrottleRequests();
#endif
+ data_reduction_proxy::DataReductionProxyNetworkDelegate* network_delegate =
+ new data_reduction_proxy::DataReductionProxyNetworkDelegate(
+ chrome_network_delegate.Pass());
+
globals_->system_network_delegate.reset(network_delegate);
globals_->host_resolver = CreateGlobalHostResolver(net_log_);
UpdateDnsClientEnabled();
@@ -1134,7 +1139,7 @@ void IOThread::ConfigureQuic(const CommandLine& command_line) {
}
void IOThread::SetupDataReductionProxy(
- ChromeNetworkDelegate* network_delegate) {
+ data_reduction_proxy::DataReductionProxyNetworkDelegate* network_delegate) {
// TODO(kundaji): Move flags initialization to DataReductionProxyParams and
// merge with flag initialization in
// data_reduction_proxy_chrome_settings_factory.cc.

Powered by Google App Engine
This is Rietveld 408576698