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_IMPL_JOB_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 Job(Delegate* delegate, | 172 Job(Delegate* delegate, |
173 JobType job_type, | 173 JobType job_type, |
174 HttpNetworkSession* session, | 174 HttpNetworkSession* session, |
175 const HttpRequestInfo& request_info, | 175 const HttpRequestInfo& request_info, |
176 RequestPriority priority, | 176 RequestPriority priority, |
177 const ProxyInfo& proxy_info, | 177 const ProxyInfo& proxy_info, |
178 const SSLConfig& server_ssl_config, | 178 const SSLConfig& server_ssl_config, |
179 const SSLConfig& proxy_ssl_config, | 179 const SSLConfig& proxy_ssl_config, |
180 HostPortPair destination, | 180 HostPortPair destination, |
181 GURL origin_url, | 181 GURL origin_url, |
182 AlternativeService alternative_service, | 182 const AlternativeServiceInfo& alternative_service_info, |
183 const ProxyServer& alternative_proxy_server, | 183 const ProxyServer& alternative_proxy_server, |
184 bool enable_ip_based_pooling, | 184 bool enable_ip_based_pooling, |
185 NetLog* net_log); | 185 NetLog* net_log); |
186 virtual ~Job(); | 186 virtual ~Job(); |
187 | 187 |
188 // Start initiates the process of creating a new HttpStream. | 188 // Start initiates the process of creating a new HttpStream. |
189 // |delegate_| will be notified upon completion. | 189 // |delegate_| will be notified upon completion. |
190 void Start(HttpStreamRequest::StreamType stream_type); | 190 void Start(HttpStreamRequest::StreamType stream_type); |
191 | 191 |
192 // Preconnect will attempt to request |num_streams| sockets from the | 192 // Preconnect will attempt to request |num_streams| sockets from the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 size_t EstimateMemoryUsage() const; | 225 size_t EstimateMemoryUsage() const; |
226 | 226 |
227 bool is_waiting() const { return next_state_ == STATE_WAIT_COMPLETE; } | 227 bool is_waiting() const { return next_state_ == STATE_WAIT_COMPLETE; } |
228 const SSLConfig& server_ssl_config() const; | 228 const SSLConfig& server_ssl_config() const; |
229 const SSLConfig& proxy_ssl_config() const; | 229 const SSLConfig& proxy_ssl_config() const; |
230 const ProxyInfo& proxy_info() const; | 230 const ProxyInfo& proxy_info() const; |
231 | 231 |
232 JobType job_type() const { return job_type_; } | 232 JobType job_type() const { return job_type_; } |
233 | 233 |
234 const AlternativeService alternative_service() const { | 234 const AlternativeService alternative_service() const { |
235 return alternative_service_; | 235 return alternative_service_info_.alternative_service; |
236 } | 236 } |
237 | 237 |
238 const ProxyServer alternative_proxy_server() const { | 238 const ProxyServer alternative_proxy_server() const { |
239 return alternative_proxy_server_; | 239 return alternative_proxy_server_; |
240 } | 240 } |
241 | 241 |
242 bool using_existing_quic_session() const { | 242 bool using_existing_quic_session() const { |
243 return using_existing_quic_session_; | 243 return using_existing_quic_session_; |
244 } | 244 } |
245 | 245 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 SSLInfo ssl_info_; | 409 SSLInfo ssl_info_; |
410 | 410 |
411 // The server we are trying to reach, could be that of the origin or of the | 411 // The server we are trying to reach, could be that of the origin or of the |
412 // alternative service (after applying host mapping rules). | 412 // alternative service (after applying host mapping rules). |
413 const HostPortPair destination_; | 413 const HostPortPair destination_; |
414 | 414 |
415 // The origin url we're trying to reach. This url may be different from the | 415 // The origin url we're trying to reach. This url may be different from the |
416 // original request when host mapping rules are set-up. | 416 // original request when host mapping rules are set-up. |
417 const GURL origin_url_; | 417 const GURL origin_url_; |
418 | 418 |
419 // AlternativeService for this Job if this is an alternative Job. | 419 // AlternativeServiceInfo for this Job if this is an alternative Job. |
420 const AlternativeService alternative_service_; | 420 const AlternativeServiceInfo alternative_service_info_; |
421 | 421 |
422 // Alternative proxy server that should be used by |this| to fetch the | 422 // Alternative proxy server that should be used by |this| to fetch the |
423 // request. | 423 // request. |
424 const ProxyServer alternative_proxy_server_; | 424 const ProxyServer alternative_proxy_server_; |
425 | 425 |
426 // Enable pooling to a SpdySession with matching IP and certificate | 426 // Enable pooling to a SpdySession with matching IP and certificate |
427 // even if the SpdySessionKey is different. | 427 // even if the SpdySessionKey is different. |
428 const bool enable_ip_based_pooling_; | 428 const bool enable_ip_based_pooling_; |
429 | 429 |
430 // Unowned. |this| job is owned by |delegate_|. | 430 // Unowned. |this| job is owned by |delegate_|. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 HttpStreamFactoryImpl::Job::Delegate* delegate, | 511 HttpStreamFactoryImpl::Job::Delegate* delegate, |
512 HttpStreamFactoryImpl::JobType job_type, | 512 HttpStreamFactoryImpl::JobType job_type, |
513 HttpNetworkSession* session, | 513 HttpNetworkSession* session, |
514 const HttpRequestInfo& request_info, | 514 const HttpRequestInfo& request_info, |
515 RequestPriority priority, | 515 RequestPriority priority, |
516 const ProxyInfo& proxy_info, | 516 const ProxyInfo& proxy_info, |
517 const SSLConfig& server_ssl_config, | 517 const SSLConfig& server_ssl_config, |
518 const SSLConfig& proxy_ssl_config, | 518 const SSLConfig& proxy_ssl_config, |
519 HostPortPair destination, | 519 HostPortPair destination, |
520 GURL origin_url, | 520 GURL origin_url, |
521 AlternativeService alternative_service, | 521 const AlternativeServiceInfo& alternative_service_info, |
522 bool enable_ip_based_pooling, | 522 bool enable_ip_based_pooling, |
523 NetLog* net_log); | 523 NetLog* net_log); |
524 | 524 |
525 virtual std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( | 525 virtual std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( |
526 HttpStreamFactoryImpl::Job::Delegate* delegate, | 526 HttpStreamFactoryImpl::Job::Delegate* delegate, |
527 HttpStreamFactoryImpl::JobType job_type, | 527 HttpStreamFactoryImpl::JobType job_type, |
528 HttpNetworkSession* session, | 528 HttpNetworkSession* session, |
529 const HttpRequestInfo& request_info, | 529 const HttpRequestInfo& request_info, |
530 RequestPriority priority, | 530 RequestPriority priority, |
531 const ProxyInfo& proxy_info, | 531 const ProxyInfo& proxy_info, |
532 const SSLConfig& server_ssl_config, | 532 const SSLConfig& server_ssl_config, |
533 const SSLConfig& proxy_ssl_config, | 533 const SSLConfig& proxy_ssl_config, |
534 HostPortPair destination, | 534 HostPortPair destination, |
535 GURL origin_url, | 535 GURL origin_url, |
536 const ProxyServer& alternative_proxy_server, | 536 const ProxyServer& alternative_proxy_server, |
537 bool enable_ip_based_pooling, | 537 bool enable_ip_based_pooling, |
538 NetLog* net_log); | 538 NetLog* net_log); |
539 }; | 539 }; |
540 | 540 |
541 } // namespace net | 541 } // namespace net |
542 | 542 |
543 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 543 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
OLD | NEW |