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/http_stream_factory.h" | 5 #include "net/http/http_stream_factory.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "net/base/host_mapping_rules.h" | 12 #include "net/base/host_mapping_rules.h" |
13 #include "net/base/host_port_pair.h" | 13 #include "net/base/host_port_pair.h" |
14 #include "net/base/parse_number.h" | 14 #include "net/base/parse_number.h" |
15 #include "net/base/port_util.h" | 15 #include "net/base/port_util.h" |
16 #include "net/http/http_network_session.h" | 16 #include "net/http/http_network_session.h" |
17 #include "net/http/http_response_headers.h" | 17 #include "net/http/http_response_headers.h" |
18 #include "net/quic/core/quic_packets.h" | 18 #include "net/quic/core/quic_packets.h" |
19 #include "net/spdy/spdy_alt_svc_wire_format.h" | 19 #include "net/spdy/core/spdy_alt_svc_wire_format.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 HttpStreamFactory::~HttpStreamFactory() {} | 24 HttpStreamFactory::~HttpStreamFactory() {} |
25 | 25 |
26 void HttpStreamFactory::ProcessAlternativeServices( | 26 void HttpStreamFactory::ProcessAlternativeServices( |
27 HttpNetworkSession* session, | 27 HttpNetworkSession* session, |
28 const HttpResponseHeaders* headers, | 28 const HttpResponseHeaders* headers, |
29 const url::SchemeHostPort& http_server) { | 29 const url::SchemeHostPort& http_server) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 const url::SchemeHostPort& server) { | 90 const url::SchemeHostPort& server) { |
91 HostPortPair host_port_pair(server.host(), server.port()); | 91 HostPortPair host_port_pair(server.host(), server.port()); |
92 const HostMappingRules* mapping_rules = GetHostMappingRules(); | 92 const HostMappingRules* mapping_rules = GetHostMappingRules(); |
93 if (mapping_rules) | 93 if (mapping_rules) |
94 mapping_rules->RewriteHost(&host_port_pair); | 94 mapping_rules->RewriteHost(&host_port_pair); |
95 return url::SchemeHostPort(server.scheme(), host_port_pair.host(), | 95 return url::SchemeHostPort(server.scheme(), host_port_pair.host(), |
96 host_port_pair.port()); | 96 host_port_pair.port()); |
97 } | 97 } |
98 | 98 |
99 } // namespace net | 99 } // namespace net |
OLD | NEW |