| 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 "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
| 9 #include "net/http/http_stream_factory_impl_job.h" | 9 #include "net/http/http_stream_factory_impl_job.h" |
| 10 #include "net/http/http_stream_factory_impl_request.h" | 10 #include "net/http/http_stream_factory_impl_request.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Called to report to http_server_properties to mark alternative service | 211 // Called to report to http_server_properties to mark alternative service |
| 212 // broken. | 212 // broken. |
| 213 void ReportBrokenAlternativeService(); | 213 void ReportBrokenAlternativeService(); |
| 214 | 214 |
| 215 void MaybeNotifyFactoryOfCompletion(); | 215 void MaybeNotifyFactoryOfCompletion(); |
| 216 | 216 |
| 217 // Called to resume the main job with delay. Main job is resumed only when | 217 // Called to resume the main job with delay. Main job is resumed only when |
| 218 // |alternative_job_| has failed or |main_job_wait_time_| elapsed. | 218 // |alternative_job_| has failed or |main_job_wait_time_| elapsed. |
| 219 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay); | 219 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay); |
| 220 | 220 |
| 221 // Posts a task to resume the main job after |delay|. | |
| 222 void ResumeMainJobLater(const base::TimeDelta& delay); | |
| 223 | |
| 224 // Resumes the main job immediately. | |
| 225 void ResumeMainJob(); | 221 void ResumeMainJob(); |
| 226 | 222 |
| 227 // Returns true if QUIC is whitelisted for |host|. | 223 // Returns true if QUIC is whitelisted for |host|. |
| 228 bool IsQuicWhitelistedForHost(const std::string& host); | 224 bool IsQuicWhitelistedForHost(const std::string& host); |
| 229 | 225 |
| 230 AlternativeService GetAlternativeServiceFor( | 226 AlternativeService GetAlternativeServiceFor( |
| 231 const HttpRequestInfo& request_info, | 227 const HttpRequestInfo& request_info, |
| 232 HttpStreamRequest::Delegate* delegate, | 228 HttpStreamRequest::Delegate* delegate, |
| 233 HttpStreamRequest::StreamType stream_type); | 229 HttpStreamRequest::StreamType stream_type); |
| 234 | 230 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 301 |
| 306 // True if an alternative proxy server job can be started to fetch |request_|. | 302 // True if an alternative proxy server job can be started to fetch |request_|. |
| 307 bool can_start_alternative_proxy_job_; | 303 bool can_start_alternative_proxy_job_; |
| 308 | 304 |
| 309 base::WeakPtrFactory<JobController> ptr_factory_; | 305 base::WeakPtrFactory<JobController> ptr_factory_; |
| 310 }; | 306 }; |
| 311 | 307 |
| 312 } // namespace net | 308 } // namespace net |
| 313 | 309 |
| 314 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 310 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
| OLD | NEW |