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

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

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a comment. Created 7 years, 7 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
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_IMPL_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 21 matching lines...) Expand all
32 32
33 // HttpStreamFactory interface 33 // HttpStreamFactory interface
34 virtual HttpStreamRequest* RequestStream( 34 virtual HttpStreamRequest* RequestStream(
35 const HttpRequestInfo& info, 35 const HttpRequestInfo& info,
36 RequestPriority priority, 36 RequestPriority priority,
37 const SSLConfig& server_ssl_config, 37 const SSLConfig& server_ssl_config,
38 const SSLConfig& proxy_ssl_config, 38 const SSLConfig& proxy_ssl_config,
39 HttpStreamRequest::Delegate* delegate, 39 HttpStreamRequest::Delegate* delegate,
40 const BoundNetLog& net_log) OVERRIDE; 40 const BoundNetLog& net_log) OVERRIDE;
41 41
42 virtual HttpStreamRequest* RequestStreamForWebSocket(
43 const HttpRequestInfo& info,
44 RequestPriority priority,
45 const SSLConfig& server_ssl_config,
46 const SSLConfig& proxy_ssl_config,
47 HttpStreamRequest::Delegate* delegate,
48 const BoundNetLog& net_log) OVERRIDE;
49
42 virtual void PreconnectStreams(int num_streams, 50 virtual void PreconnectStreams(int num_streams,
43 const HttpRequestInfo& info, 51 const HttpRequestInfo& info,
44 RequestPriority priority, 52 RequestPriority priority,
45 const SSLConfig& server_ssl_config, 53 const SSLConfig& server_ssl_config,
46 const SSLConfig& proxy_ssl_config) OVERRIDE; 54 const SSLConfig& proxy_ssl_config) OVERRIDE;
47 virtual base::Value* PipelineInfoToValue() const OVERRIDE; 55 virtual base::Value* PipelineInfoToValue() const OVERRIDE;
48 virtual const HostMappingRules* GetHostMappingRules() const OVERRIDE; 56 virtual const HostMappingRules* GetHostMappingRules() const OVERRIDE;
49 57
50 // HttpPipelinedHostPool::Delegate interface 58 // HttpPipelinedHostPool::Delegate interface
51 virtual void OnHttpPipelinedHostHasAdditionalCapacity( 59 virtual void OnHttpPipelinedHostHasAdditionalCapacity(
52 HttpPipelinedHost* host) OVERRIDE; 60 HttpPipelinedHost* host) OVERRIDE;
53 61
54 private: 62 private:
55 class Request; 63 class Request;
56 class Job; 64 class Job;
57 65
58 typedef std::set<Request*> RequestSet; 66 typedef std::set<Request*> RequestSet;
59 typedef std::vector<Request*> RequestVector; 67 typedef std::vector<Request*> RequestVector;
60 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap; 68 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap;
61 typedef std::map<HttpPipelinedHost::Key, 69 typedef std::map<HttpPipelinedHost::Key,
62 RequestVector> HttpPipeliningRequestMap; 70 RequestVector> HttpPipeliningRequestMap;
63 71
72 HttpStreamRequest* RequestStreamInternal(
73 const HttpRequestInfo& info,
74 RequestPriority priority,
75 const SSLConfig& server_ssl_config,
76 const SSLConfig& proxy_ssl_config,
77 HttpStreamRequest::Delegate* delegate,
78 const BoundNetLog& net_log,
79 bool for_websocket);
80
64 PortAlternateProtocolPair GetAlternateProtocolRequestFor( 81 PortAlternateProtocolPair GetAlternateProtocolRequestFor(
65 const GURL& original_url, 82 const GURL& original_url,
66 GURL* alternate_url) const; 83 GURL* alternate_url) const;
67 84
68 // Detaches |job| from |request|. 85 // Detaches |job| from |request|.
69 void OrphanJob(Job* job, const Request* request); 86 void OrphanJob(Job* job, const Request* request);
70 87
71 // Called when a SpdySession is ready. It will find appropriate Requests and 88 // Called when a SpdySession is ready. It will find appropriate Requests and
72 // fulfill them. |direct| indicates whether or not |spdy_session| uses a 89 // fulfill them. |direct| indicates whether or not |spdy_session| uses a
73 // proxy. 90 // proxy.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be 139 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be
123 // deleted when the factory is destroyed. 140 // deleted when the factory is destroyed.
124 std::set<const Job*> preconnect_job_set_; 141 std::set<const Job*> preconnect_job_set_;
125 142
126 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); 143 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
127 }; 144 };
128 145
129 } // namespace net 146 } // namespace net
130 147
131 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 148 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698