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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // Called to resume the main job with delay. Main job is resumed only when | 241 // Called to resume the main job with delay. Main job is resumed only when |
242 // |alternative_job_| has failed or |main_job_wait_time_| elapsed. | 242 // |alternative_job_| has failed or |main_job_wait_time_| elapsed. |
243 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay); | 243 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay); |
244 | 244 |
245 // Posts a task to resume the main job after |delay|. | 245 // Posts a task to resume the main job after |delay|. |
246 void ResumeMainJobLater(const base::TimeDelta& delay); | 246 void ResumeMainJobLater(const base::TimeDelta& delay); |
247 | 247 |
248 // Resumes the main job immediately. | 248 // Resumes the main job immediately. |
249 void ResumeMainJob(); | 249 void ResumeMainJob(); |
250 | 250 |
251 AlternativeService GetAlternativeServiceFor( | 251 AlternativeServiceInfo GetAlternativeServiceInfoFor( |
252 const HttpRequestInfo& request_info, | 252 const HttpRequestInfo& request_info, |
253 HttpStreamRequest::Delegate* delegate, | 253 HttpStreamRequest::Delegate* delegate, |
254 HttpStreamRequest::StreamType stream_type); | 254 HttpStreamRequest::StreamType stream_type); |
255 | 255 |
256 AlternativeService GetAlternativeServiceForInternal( | 256 AlternativeServiceInfo GetAlternativeServiceInfoInternal( |
257 const HttpRequestInfo& request_info, | 257 const HttpRequestInfo& request_info, |
258 HttpStreamRequest::Delegate* delegate, | 258 HttpStreamRequest::Delegate* delegate, |
259 HttpStreamRequest::StreamType stream_type); | 259 HttpStreamRequest::StreamType stream_type); |
260 | 260 |
261 // Remove session from the SpdySessionRequestMap. | 261 // Remove session from the SpdySessionRequestMap. |
262 void RemoveRequestFromSpdySessionRequestMap(); | 262 void RemoveRequestFromSpdySessionRequestMap(); |
263 | 263 |
264 // Returns true if the |request_| can be fetched via an alternative | 264 // Returns true if the |request_| can be fetched via an alternative |
265 // proxy server, and sets |alternative_proxy_server| to the available | 265 // proxy server, and sets |alternative_proxy_server| to the available |
266 // alternative proxy server. |alternative_proxy_server| should not be null, | 266 // alternative proxy server. |alternative_proxy_server| should not be null, |
(...skipping 82 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 |