OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_CONTROLLER_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "net/base/host_port_pair.h" | 10 #include "net/base/host_port_pair.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // Enable using alternative services for the request. | 333 // Enable using alternative services for the request. |
334 const bool enable_alternative_services_; | 334 const bool enable_alternative_services_; |
335 | 335 |
336 // |main_job_| is a job waiting to see if |alternative_job_| can reuse a | 336 // |main_job_| is a job waiting to see if |alternative_job_| can reuse a |
337 // connection. If |alternative_job_| is unable to do so, |this| will notify | 337 // connection. If |alternative_job_| is unable to do so, |this| will notify |
338 // |main_job_| to proceed and then race the two jobs. | 338 // |main_job_| to proceed and then race the two jobs. |
339 std::unique_ptr<Job> main_job_; | 339 std::unique_ptr<Job> main_job_; |
340 std::unique_ptr<Job> alternative_job_; | 340 std::unique_ptr<Job> alternative_job_; |
341 // The alternative service used by |alternative_job_| | 341 // The alternative service used by |alternative_job_| |
342 // (or by |main_job_| if |is_preconnect_|.) | 342 // (or by |main_job_| if |is_preconnect_|.) |
343 AlternativeService alternative_service_; | 343 AlternativeServiceInfo alternative_service_info_; |
344 | 344 |
345 // Net error code of the failed alternative job. Set to OK by default. | 345 // Net error code of the failed alternative job. Set to OK by default. |
346 int alternative_job_net_error_; | 346 int alternative_job_net_error_; |
347 | 347 |
348 // True if a Job has ever been bound to the |request_|. | 348 // True if a Job has ever been bound to the |request_|. |
349 bool job_bound_; | 349 bool job_bound_; |
350 | 350 |
351 // True if the main job has to wait for the alternative job: i.e., the main | 351 // True if the main job has to wait for the alternative job: i.e., the main |
352 // job must not create a connection until it is resumed. | 352 // job must not create a connection until it is resumed. |
353 bool main_job_is_blocked_; | 353 bool main_job_is_blocked_; |
(...skipping 22 matching lines...) Expand all Loading... |
376 HttpStreamRequest::StreamType stream_type_; | 376 HttpStreamRequest::StreamType stream_type_; |
377 RequestPriority priority_; | 377 RequestPriority priority_; |
378 const NetLogWithSource net_log_; | 378 const NetLogWithSource net_log_; |
379 | 379 |
380 base::WeakPtrFactory<JobController> ptr_factory_; | 380 base::WeakPtrFactory<JobController> ptr_factory_; |
381 }; | 381 }; |
382 | 382 |
383 } // namespace net | 383 } // namespace net |
384 | 384 |
385 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 385 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
OLD | NEW |