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

Side by Side Diff: net/http/http_stream_factory.h

Issue 1817583002: Process Alternative Service headers in net::BidirectionalStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@toggle2
Patch Set: Address comments and rebased Created 4 years, 9 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 | « net/http/http_network_transaction.cc ('k') | net/http/http_stream_factory.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 #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 20 matching lines...) Expand all
31 31
32 namespace net { 32 namespace net {
33 33
34 class AuthCredentials; 34 class AuthCredentials;
35 class BoundNetLog; 35 class BoundNetLog;
36 class BidirectionalStreamJob; 36 class BidirectionalStreamJob;
37 class HostMappingRules; 37 class HostMappingRules;
38 class HostPortPair; 38 class HostPortPair;
39 class HttpAuthController; 39 class HttpAuthController;
40 class HttpNetworkSession; 40 class HttpNetworkSession;
41 class HttpResponseHeaders;
41 class HttpResponseInfo; 42 class HttpResponseInfo;
42 class HttpServerProperties; 43 class HttpServerProperties;
43 class HttpStream; 44 class HttpStream;
44 class ProxyInfo; 45 class ProxyInfo;
45 class SSLCertRequestInfo; 46 class SSLCertRequestInfo;
46 class SSLInfo; 47 class SSLInfo;
47 struct HttpRequestInfo; 48 struct HttpRequestInfo;
48 struct SSLConfig; 49 struct SSLConfig;
49 50
50 // The HttpStreamRequest is the client's handle to the worker object which 51 // The HttpStreamRequest is the client's handle to the worker object which
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 // Returns socket-layer connection attempts made for this stream request. 195 // Returns socket-layer connection attempts made for this stream request.
195 virtual const ConnectionAttempts& connection_attempts() const = 0; 196 virtual const ConnectionAttempts& connection_attempts() const = 0;
196 }; 197 };
197 198
198 // The HttpStreamFactory defines an interface for creating usable HttpStreams. 199 // The HttpStreamFactory defines an interface for creating usable HttpStreams.
199 class NET_EXPORT HttpStreamFactory { 200 class NET_EXPORT HttpStreamFactory {
200 public: 201 public:
201 virtual ~HttpStreamFactory(); 202 virtual ~HttpStreamFactory();
202 203
203 void ProcessAlternativeService( 204 void ProcessAlternativeServices(HttpNetworkSession* session,
204 const base::WeakPtr<HttpServerProperties>& http_server_properties, 205 const HttpResponseHeaders* headers,
205 base::StringPiece alternative_service_str, 206 const HostPortPair& http_host_port_pair);
206 const HostPortPair& http_host_port_pair,
207 const HttpNetworkSession& session);
208
209 void ProcessAlternateProtocol(
210 const base::WeakPtr<HttpServerProperties>& http_server_properties,
211 const std::vector<std::string>& alternate_protocol_values,
212 const HostPortPair& http_host_port_pair,
213 const HttpNetworkSession& session);
214 207
215 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); 208 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint);
216 209
217 // Virtual interface methods. 210 // Virtual interface methods.
218 211
219 // Request a stream. 212 // Request a stream.
220 // Will call delegate->OnStreamReady on successful completion. 213 // Will call delegate->OnStreamReady on successful completion.
221 virtual HttpStreamRequest* RequestStream( 214 virtual HttpStreamRequest* RequestStream(
222 const HttpRequestInfo& info, 215 const HttpRequestInfo& info,
223 RequestPriority priority, 216 RequestPriority priority,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // HttpNetworkSession. 260 // HttpNetworkSession.
268 static void set_spdy_enabled(bool value) { 261 static void set_spdy_enabled(bool value) {
269 spdy_enabled_ = value; 262 spdy_enabled_ = value;
270 } 263 }
271 static bool spdy_enabled() { return spdy_enabled_; } 264 static bool spdy_enabled() { return spdy_enabled_; }
272 265
273 protected: 266 protected:
274 HttpStreamFactory(); 267 HttpStreamFactory();
275 268
276 private: 269 private:
270 void ProcessAlternativeService(
271 const base::WeakPtr<HttpServerProperties>& http_server_properties,
272 base::StringPiece alternative_service_str,
273 const HostPortPair& http_host_port_pair,
274 const HttpNetworkSession& session);
275
276 void ProcessAlternateProtocol(
277 const base::WeakPtr<HttpServerProperties>& http_server_properties,
278 const std::vector<std::string>& alternate_protocol_values,
279 const HostPortPair& http_host_port_pair,
280 const HttpNetworkSession& session);
281
277 static bool spdy_enabled_; 282 static bool spdy_enabled_;
278 283
279 HostPortPair RewriteHost(HostPortPair host_port_pair); 284 HostPortPair RewriteHost(HostPortPair host_port_pair);
280 285
281 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory); 286 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactory);
282 }; 287 };
283 288
284 } // namespace net 289 } // namespace net
285 290
286 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_ 291 #endif // NET_HTTP_HTTP_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698