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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 360113004: Add header pointer to BeforeProxyHeadersSentCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 } 878 }
879 879
880 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) 880 if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY))
881 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader( 881 auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader(
882 &request_headers_); 882 &request_headers_);
883 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) 883 if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER))
884 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader( 884 auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
885 &request_headers_); 885 &request_headers_);
886 886
887 if (using_proxy && !before_proxy_headers_sent_callback_.is_null()) 887 if (using_proxy && !before_proxy_headers_sent_callback_.is_null())
888 before_proxy_headers_sent_callback_.Run(proxy_info_); 888 before_proxy_headers_sent_callback_.Run(proxy_info_, &request_headers_);
mmenke 2014/07/01 18:08:54 Should move this below "request_headers_.MergeFrom
bengr 2014/07/01 18:18:51 Done.
889 889
890 request_headers_.MergeFrom(request_->extra_headers); 890 request_headers_.MergeFrom(request_->extra_headers);
891 response_.did_use_http_auth = 891 response_.did_use_http_auth =
892 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) || 892 request_headers_.HasHeader(HttpRequestHeaders::kAuthorization) ||
893 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization); 893 request_headers_.HasHeader(HttpRequestHeaders::kProxyAuthorization);
894 } 894 }
895 895
896 int HttpNetworkTransaction::DoInitRequestBody() { 896 int HttpNetworkTransaction::DoInitRequestBody() {
897 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE; 897 next_state_ = STATE_INIT_REQUEST_BODY_COMPLETE;
898 int rv = OK; 898 int rv = OK;
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1559 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1560 state); 1560 state);
1561 break; 1561 break;
1562 } 1562 }
1563 return description; 1563 return description;
1564 } 1564 }
1565 1565
1566 #undef STATE_CASE 1566 #undef STATE_CASE
1567 1567
1568 } // namespace net 1568 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698