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

Unified Diff: chrome/browser/io_thread.cc

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: errata Created 6 years, 6 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 9472b7e938be977f976770d0a735ae8e34f06806..7c918c7d73ffab946e74f87e714365b06f58ad25 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -41,7 +41,6 @@
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
-#include "components/data_reduction_proxy/browser/http_auth_handler_data_reduction_proxy.h"
#include "components/policy/core/common/policy_service.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/browser_thread.h"
@@ -93,6 +92,7 @@
#endif
#if defined(OS_ANDROID) || defined(OS_IOS)
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
#endif
@@ -106,6 +106,7 @@
using content::BrowserThread;
#if defined(OS_ANDROID) || defined(OS_IOS)
+using data_reduction_proxy::DataReductionProxyAuthRequestHandler;
using data_reduction_proxy::DataReductionProxyParams;
using data_reduction_proxy::DataReductionProxyUsageStats;
using data_reduction_proxy::DataReductionProxySettings;
@@ -625,13 +626,17 @@ void IOThread::InitAsync() {
DataReductionProxyParams* proxy_params =
new DataReductionProxyParams(drp_flags);
globals_->data_reduction_proxy_params.reset(proxy_params);
- network_delegate->set_data_reduction_proxy_params(proxy_params);
+ globals_->data_reduction_proxy_auth_request_handler.reset(
+ new DataReductionProxyAuthRequestHandler(proxy_params));
DataReductionProxyUsageStats* proxy_usage_stats =
new DataReductionProxyUsageStats(proxy_params,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
+ network_delegate->set_data_reduction_proxy_params(proxy_params);
globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats);
network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats);
+ network_delegate->set_data_reduction_proxy_auth_request_handler(
+ globals_->data_reduction_proxy_auth_request_handler.get());
#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
#endif // defined(OS_ANDROID) || defined(OS_IOS)
globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory(
@@ -927,18 +932,6 @@ net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory(
supported_schemes, globals_->url_security_manager.get(),
resolver, gssapi_library_name_, negotiate_disable_cname_lookup_,
negotiate_enable_port_));
-
- if (globals_->data_reduction_proxy_params.get()) {
- std::vector<GURL> data_reduction_proxies =
- globals_->data_reduction_proxy_params->GetAllowedProxies();
- if (!data_reduction_proxies.empty()) {
- registry_factory->RegisterSchemeFactory(
- "spdyproxy",
- new data_reduction_proxy::HttpAuthHandlerDataReductionProxy::Factory(
- data_reduction_proxies));
- }
- }
-
return registry_factory.release();
}
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/net/chrome_network_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698