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

Unified Diff: android_webview/browser/net/aw_network_delegate.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
Index: android_webview/browser/net/aw_network_delegate.cc
diff --git a/android_webview/browser/net/aw_network_delegate.cc b/android_webview/browser/net/aw_network_delegate.cc
index b3fb3fa243854d038b82ea49ec3ee601af2e21bf..5c280c52008eba1a68f4cc8c3c0a05b2b949ead0 100644
--- a/android_webview/browser/net/aw_network_delegate.cc
+++ b/android_webview/browser/net/aw_network_delegate.cc
@@ -6,14 +6,20 @@
#include "android_webview/browser/aw_cookie_access_policy.h"
#include "base/android/build_info.h"
+#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_protocol.h"
#include "net/base/net_errors.h"
#include "net/base/completion_callback.h"
+#include "net/proxy/proxy_info.h"
+#include "net/proxy/proxy_server.h"
#include "net/url_request/url_request.h"
namespace android_webview {
-AwNetworkDelegate::AwNetworkDelegate() : data_reduction_proxy_params_(NULL) {
+AwNetworkDelegate::AwNetworkDelegate()
+ : data_reduction_proxy_params_(NULL),
+ data_reduction_proxy_auth_request_handler_(NULL) {
}
AwNetworkDelegate::~AwNetworkDelegate() {
@@ -38,6 +44,16 @@ int AwNetworkDelegate::OnBeforeSendHeaders(
return net::OK;
}
+void AwNetworkDelegate::OnBeforeSendProxyHeaders(
+ net::URLRequest* request,
+ const net::ProxyInfo& proxy_info,
+ net::HttpRequestHeaders* headers) {
+ if (data_reduction_proxy_auth_request_handler_) {
+ data_reduction_proxy_auth_request_handler_->MaybeAddRequestHeader(
+ request, proxy_info.proxy_server(), headers);
+ }
+}
+
void AwNetworkDelegate::OnSendHeaders(net::URLRequest* request,
const net::HttpRequestHeaders& headers) {
}
« no previous file with comments | « android_webview/browser/net/aw_network_delegate.h ('k') | android_webview/browser/net/aw_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698