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

Unified Diff: net/http/http_network_transaction.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 | « net/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 32af2dd1844a8170be8615aa2701601e24ee0b63..78f238a9bbd561b26f24f655b45a57680e2b9695 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -465,6 +465,11 @@ void HttpNetworkTransaction::SetBeforeNetworkStartCallback(
before_network_start_callback_ = callback;
}
+void HttpNetworkTransaction::SetBeforeProxyHeadersSentCallback(
+ const BeforeProxyHeadersSentCallback& callback) {
+ before_proxy_headers_sent_callback_ = callback;
+}
+
int HttpNetworkTransaction::ResumeNetworkStart() {
DCHECK_EQ(next_state_, STATE_CREATE_STREAM);
return DoLoop(OK);
@@ -879,6 +884,9 @@ void HttpNetworkTransaction::BuildRequestHeaders(bool using_proxy) {
auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
&request_headers_);
+ if (using_proxy && !before_proxy_headers_sent_callback_.is_null())
+ before_proxy_headers_sent_callback_.Run(proxy_info_);
+
request_headers_.MergeFrom(request_->extra_headers);
response_.did_use_http_auth =
request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) ||
« no previous file with comments | « net/http/http_network_transaction.h ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698