| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Used in tests only for verification purpose. | 39 // Used in tests only for verification purpose. |
| 40 const Job* main_job() const { return main_job_.get(); } | 40 const Job* main_job() const { return main_job_.get(); } |
| 41 const Job* alternative_job() const { return alternative_job_.get(); } | 41 const Job* alternative_job() const { return alternative_job_.get(); } |
| 42 | 42 |
| 43 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); | 43 GURL ApplyHostMappingRules(const GURL& url, HostPortPair* endpoint); |
| 44 | 44 |
| 45 // Methods below are called by HttpStreamFactoryImpl only. | 45 // Methods below are called by HttpStreamFactoryImpl only. |
| 46 // Creates request and hands out to HttpStreamFactoryImpl, this will also | 46 // Creates request and hands out to HttpStreamFactoryImpl, this will also |
| 47 // create Job(s) and start serving the created request. | 47 // create Job(s) and start serving the created request. |
| 48 Request* Start(HttpStreamRequest::Delegate* delegate, | 48 std::unique_ptr<Request> Start(HttpStreamRequest::Delegate* delegate, |
| 49 WebSocketHandshakeStreamBase::CreateHelper* | 49 WebSocketHandshakeStreamBase::CreateHelper* |
| 50 websocket_handshake_stream_create_helper, | 50 websocket_handshake_stream_create_helper, |
| 51 const NetLogWithSource& source_net_log, | 51 const NetLogWithSource& source_net_log, |
| 52 HttpStreamRequest::StreamType stream_type, | 52 HttpStreamRequest::StreamType stream_type, |
| 53 RequestPriority priority); | 53 RequestPriority priority); |
| 54 | 54 |
| 55 void Preconnect(int num_streams); | 55 void Preconnect(int num_streams); |
| 56 | 56 |
| 57 // From HttpStreamFactoryImpl::Request::Helper. | 57 // From HttpStreamFactoryImpl::Request::Helper. |
| 58 // Returns the LoadState for Request. | 58 // Returns the LoadState for Request. |
| 59 LoadState GetLoadState() const override; | 59 LoadState GetLoadState() const override; |
| 60 | 60 |
| 61 // Called when Request is destructed. Job(s) associated with but not bound to | 61 // Called when Request is destructed. Job(s) associated with but not bound to |
| 62 // |request_| will be deleted. |request_| and |bound_job_| will be nulled if | 62 // |request_| will be deleted. |request_| and |bound_job_| will be nulled if |
| 63 // ever set. | 63 // ever set. |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 HttpStreamRequest::StreamType stream_type_; | 349 HttpStreamRequest::StreamType stream_type_; |
| 350 RequestPriority priority_; | 350 RequestPriority priority_; |
| 351 const NetLogWithSource net_log_; | 351 const NetLogWithSource net_log_; |
| 352 | 352 |
| 353 base::WeakPtrFactory<JobController> ptr_factory_; | 353 base::WeakPtrFactory<JobController> ptr_factory_; |
| 354 }; | 354 }; |
| 355 | 355 |
| 356 } // namespace net | 356 } // namespace net |
| 357 | 357 |
| 358 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 358 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
| OLD | NEW |