| OLD | NEW |
| 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/proxy_client_socket.h" | 5 #include "net/http/proxy_client_socket.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "googleurl/src/gurl.h" | |
| 10 #include "net/base/host_port_pair.h" | 9 #include "net/base/host_port_pair.h" |
| 11 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| 12 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 13 #include "net/http/http_auth_controller.h" | 12 #include "net/http/http_auth_controller.h" |
| 14 #include "net/http/http_request_info.h" | 13 #include "net/http/http_request_info.h" |
| 15 #include "net/http/http_response_headers.h" | 14 #include "net/http/http_response_headers.h" |
| 16 #include "net/http/http_response_info.h" | 15 #include "net/http/http_response_info.h" |
| 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 // static | 20 // static |
| 21 void ProxyClientSocket::BuildTunnelRequest( | 21 void ProxyClientSocket::BuildTunnelRequest( |
| 22 const HttpRequestInfo& request_info, | 22 const HttpRequestInfo& request_info, |
| 23 const HttpRequestHeaders& auth_headers, | 23 const HttpRequestHeaders& auth_headers, |
| 24 const HostPortPair& endpoint, | 24 const HostPortPair& endpoint, |
| 25 std::string* request_line, | 25 std::string* request_line, |
| 26 HttpRequestHeaders* request_headers) { | 26 HttpRequestHeaders* request_headers) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 location.c_str()); | 90 location.c_str()); |
| 91 std::string raw_headers = | 91 std::string raw_headers = |
| 92 HttpUtil::AssembleRawHeaders(fake_response_headers.data(), | 92 HttpUtil::AssembleRawHeaders(fake_response_headers.data(), |
| 93 fake_response_headers.length()); | 93 fake_response_headers.length()); |
| 94 response->headers = new HttpResponseHeaders(raw_headers); | 94 response->headers = new HttpResponseHeaders(raw_headers); |
| 95 | 95 |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace net | 99 } // namespace net |
| OLD | NEW |