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

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

Issue 2910463004: Revert "Revert CLs landed in HttpStreamFactoryImpl to track down a crasher" (Closed)
Patch Set: rebased Created 3 years, 6 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_stream_factory.h ('k') | net/http/http_stream_factory_impl.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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory>
11 #include <set> 12 #include <set>
12 13
13 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "net/base/host_port_pair.h" 17 #include "net/base/host_port_pair.h"
17 #include "net/base/net_export.h" 18 #include "net/base/net_export.h"
18 #include "net/base/privacy_mode.h" 19 #include "net/base/privacy_mode.h"
19 #include "net/base/request_priority.h" 20 #include "net/base/request_priority.h"
20 #include "net/http/http_stream_factory.h" 21 #include "net/http/http_stream_factory.h"
(...skipping 15 matching lines...) Expand all
36 class NET_EXPORT_PRIVATE JobController; 37 class NET_EXPORT_PRIVATE JobController;
37 class NET_EXPORT_PRIVATE JobFactory; 38 class NET_EXPORT_PRIVATE JobFactory;
38 class NET_EXPORT_PRIVATE Request; 39 class NET_EXPORT_PRIVATE Request;
39 // RequestStream may only be called if |for_websockets| is false. 40 // RequestStream may only be called if |for_websockets| is false.
40 // RequestWebSocketHandshakeStream may only be called if |for_websockets| 41 // RequestWebSocketHandshakeStream may only be called if |for_websockets|
41 // is true. 42 // is true.
42 HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets); 43 HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets);
43 ~HttpStreamFactoryImpl() override; 44 ~HttpStreamFactoryImpl() override;
44 45
45 // HttpStreamFactory interface 46 // HttpStreamFactory interface
46 HttpStreamRequest* RequestStream(const HttpRequestInfo& info, 47 std::unique_ptr<HttpStreamRequest> RequestStream(
47 RequestPriority priority,
48 const SSLConfig& server_ssl_config,
49 const SSLConfig& proxy_ssl_config,
50 HttpStreamRequest::Delegate* delegate,
51 bool enable_ip_based_pooling,
52 bool enable_alternative_services,
53 const NetLogWithSource& net_log) override;
54
55 HttpStreamRequest* RequestWebSocketHandshakeStream(
56 const HttpRequestInfo& info, 48 const HttpRequestInfo& info,
57 RequestPriority priority, 49 RequestPriority priority,
58 const SSLConfig& server_ssl_config, 50 const SSLConfig& server_ssl_config,
51 const SSLConfig& proxy_ssl_config,
52 HttpStreamRequest::Delegate* delegate,
53 bool enable_ip_based_pooling,
54 bool enable_alternative_services,
55 const NetLogWithSource& net_log) override;
56
57 std::unique_ptr<HttpStreamRequest> RequestWebSocketHandshakeStream(
58 const HttpRequestInfo& info,
59 RequestPriority priority,
60 const SSLConfig& server_ssl_config,
59 const SSLConfig& proxy_ssl_config, 61 const SSLConfig& proxy_ssl_config,
60 HttpStreamRequest::Delegate* delegate, 62 HttpStreamRequest::Delegate* delegate,
61 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 63 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
62 bool enable_ip_based_pooling, 64 bool enable_ip_based_pooling,
63 bool enable_alternative_services, 65 bool enable_alternative_services,
64 const NetLogWithSource& net_log) override; 66 const NetLogWithSource& net_log) override;
65 67
66 HttpStreamRequest* RequestBidirectionalStreamImpl( 68 std::unique_ptr<HttpStreamRequest> RequestBidirectionalStreamImpl(
67 const HttpRequestInfo& info, 69 const HttpRequestInfo& info,
68 RequestPriority priority, 70 RequestPriority priority,
69 const SSLConfig& server_ssl_config, 71 const SSLConfig& server_ssl_config,
70 const SSLConfig& proxy_ssl_config, 72 const SSLConfig& proxy_ssl_config,
71 HttpStreamRequest::Delegate* delegate, 73 HttpStreamRequest::Delegate* delegate,
72 bool enable_ip_based_pooling, 74 bool enable_ip_based_pooling,
73 bool enable_alternative_services, 75 bool enable_alternative_services,
74 const NetLogWithSource& net_log) override; 76 const NetLogWithSource& net_log) override;
75 77
76 void PreconnectStreams(int num_streams, const HttpRequestInfo& info) override; 78 void PreconnectStreams(int num_streams, const HttpRequestInfo& info) override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // enum in histograms.xml. 114 // enum in histograms.xml.
113 enum AlternativeServiceType { 115 enum AlternativeServiceType {
114 NO_ALTERNATIVE_SERVICE = 0, 116 NO_ALTERNATIVE_SERVICE = 0,
115 QUIC_SAME_DESTINATION = 1, 117 QUIC_SAME_DESTINATION = 1,
116 QUIC_DIFFERENT_DESTINATION = 2, 118 QUIC_DIFFERENT_DESTINATION = 2,
117 NOT_QUIC_SAME_DESTINATION = 3, 119 NOT_QUIC_SAME_DESTINATION = 3,
118 NOT_QUIC_DIFFERENT_DESTINATION = 4, 120 NOT_QUIC_DIFFERENT_DESTINATION = 4,
119 MAX_ALTERNATIVE_SERVICE_TYPE 121 MAX_ALTERNATIVE_SERVICE_TYPE
120 }; 122 };
121 123
122 HttpStreamRequest* RequestStreamInternal( 124 std::unique_ptr<HttpStreamRequest> RequestStreamInternal(
123 const HttpRequestInfo& info, 125 const HttpRequestInfo& info,
124 RequestPriority priority, 126 RequestPriority priority,
125 const SSLConfig& server_ssl_config, 127 const SSLConfig& server_ssl_config,
126 const SSLConfig& proxy_ssl_config, 128 const SSLConfig& proxy_ssl_config,
127 HttpStreamRequest::Delegate* delegate, 129 HttpStreamRequest::Delegate* delegate,
128 WebSocketHandshakeStreamBase::CreateHelper* create_helper, 130 WebSocketHandshakeStreamBase::CreateHelper* create_helper,
129 HttpStreamRequest::StreamType stream_type, 131 HttpStreamRequest::StreamType stream_type,
130 bool enable_ip_based_pooling, 132 bool enable_ip_based_pooling,
131 bool enable_alternative_services, 133 bool enable_alternative_services,
132 const NetLogWithSource& net_log); 134 const NetLogWithSource& net_log);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 199
198 // The count of JobControllers that was most recently logged to histograms. 200 // The count of JobControllers that was most recently logged to histograms.
199 size_t last_logged_job_controller_count_; 201 size_t last_logged_job_controller_count_;
200 202
201 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); 203 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
202 }; 204 };
203 205
204 } // namespace net 206 } // namespace net
205 207
206 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 208 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory.h ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698