| 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 virtual const ConnectionAttempts& connection_attempts() const = 0; | 196 virtual const ConnectionAttempts& connection_attempts() const = 0; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 // The HttpStreamFactory defines an interface for creating usable HttpStreams. | 199 // The HttpStreamFactory defines an interface for creating usable HttpStreams. |
| 200 class NET_EXPORT HttpStreamFactory { | 200 class NET_EXPORT HttpStreamFactory { |
| 201 public: | 201 public: |
| 202 virtual ~HttpStreamFactory(); | 202 virtual ~HttpStreamFactory(); |
| 203 | 203 |
| 204 void ProcessAlternativeServices(HttpNetworkSession* session, | 204 void ProcessAlternativeServices(HttpNetworkSession* session, |
| 205 const HttpResponseHeaders* headers, | 205 const HttpResponseHeaders* headers, |
| 206 const HostPortPair& http_host_port_pair); | 206 const url::SchemeHostPort& http_server); |
| 207 | 207 |
| 208 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); | 208 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); |
| 209 | 209 |
| 210 // Virtual interface methods. | 210 // Virtual interface methods. |
| 211 | 211 |
| 212 // Request a stream. | 212 // Request a stream. |
| 213 // Will call delegate->OnStreamReady on successful completion. | 213 // Will call delegate->OnStreamReady on successful completion. |
| 214 virtual HttpStreamRequest* RequestStream( | 214 virtual HttpStreamRequest* RequestStream( |
| 215 const HttpRequestInfo& info, | 215 const HttpRequestInfo& info, |
| 216 RequestPriority priority, | 216 RequestPriority priority, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 static bool spdy_enabled() { return spdy_enabled_; } | 264 static bool spdy_enabled() { return spdy_enabled_; } |
| 265 | 265 |
| 266 protected: | 266 protected: |
| 267 HttpStreamFactory(); | 267 HttpStreamFactory(); |
| 268 | 268 |
| 269 private: | 269 private: |
| 270 void ProcessAlternativeService( | 270 void ProcessAlternativeService( |
| 271 const base::WeakPtr<HttpServerProperties>& http_server_properties, | 271 const base::WeakPtr<HttpServerProperties>& http_server_properties, |
| 272 base::StringPiece alternative_service_str, | 272 base::StringPiece alternative_service_str, |
| 273 const HostPortPair& http_host_port_pair, | 273 const url::SchemeHostPort& http_server, |
| 274 const HttpNetworkSession& session); | 274 const HttpNetworkSession& session); |
| 275 | 275 |
| 276 void ProcessAlternateProtocol( | 276 void ProcessAlternateProtocol( |
| 277 const base::WeakPtr<HttpServerProperties>& http_server_properties, | 277 const base::WeakPtr<HttpServerProperties>& http_server_properties, |
| 278 const std::vector<std::string>& alternate_protocol_values, | 278 const std::vector<std::string>& alternate_protocol_values, |
| 279 const HostPortPair& http_host_port_pair, | 279 const url::SchemeHostPort& http_server, |
| 280 const HttpNetworkSession& session); | 280 const HttpNetworkSession& session); |
| 281 | 281 |
| 282 static bool spdy_enabled_; | 282 static bool spdy_enabled_; |
| 283 | 283 |
| 284 HostPortPair RewriteHost(HostPortPair host_port_pair); | 284 url::SchemeHostPort RewriteHost(const url::SchemeHostPort& server); |
| 285 | 285 |
| 286 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); | 286 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 } // namespace net | 289 } // namespace net |
| 290 | 290 |
| 291 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ | 291 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ |
| OLD | NEW |