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

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

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