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

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: Added auth support to Android Webview 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
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 883e6f0215ff8d598ba640e8adffb68619413d9d..0ada3b9fd88920b44de11203a63396d2f3479507 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 "content/public/browser/browser_thread.h"
#include "content/public/browser/cookie_store_factory.h"
@@ -92,6 +91,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
@@ -105,6 +105,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::DataReductionProxySettings;
#endif
@@ -612,8 +613,13 @@ void IOThread::InitAsync() {
drp_flags |= DataReductionProxyParams::kPromoAllowed;
globals_->data_reduction_proxy_params.reset(
new DataReductionProxyParams(drp_flags));
+ globals_->data_reduction_proxy_auth_request_handler.reset(
+ new DataReductionProxyAuthRequestHandler(
+ globals_->data_reduction_proxy_params.get()));
network_delegate->set_data_reduction_proxy_params(
globals_->data_reduction_proxy_params.get());
+ 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(
@@ -909,18 +915,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();
}

Powered by Google App Engine
This is Rietveld 408576698