| 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. |
| 221 void ResumeMainJob(); | 225 void ResumeMainJob(); |
| 222 | 226 |
| 223 // Returns true if QUIC is whitelisted for |host|. | 227 // Returns true if QUIC is whitelisted for |host|. |
| 224 bool IsQuicWhitelistedForHost(const std::string& host); | 228 bool IsQuicWhitelistedForHost(const std::string& host); |
| 225 | 229 |
| 226 AlternativeService GetAlternativeServiceFor( | 230 AlternativeService GetAlternativeServiceFor( |
| 227 const HttpRequestInfo& request_info, | 231 const HttpRequestInfo& request_info, |
| 228 HttpStreamRequest::Delegate* delegate, | 232 HttpStreamRequest::Delegate* delegate, |
| 229 HttpStreamRequest::StreamType stream_type); | 233 HttpStreamRequest::StreamType stream_type); |
| 230 | 234 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 305 |
| 302 // True if an alternative proxy server job can be started to fetch |request_|. | 306 // True if an alternative proxy server job can be started to fetch |request_|. |
| 303 bool can_start_alternative_proxy_job_; | 307 bool can_start_alternative_proxy_job_; |
| 304 | 308 |
| 305 base::WeakPtrFactory<JobController> ptr_factory_; | 309 base::WeakPtrFactory<JobController> ptr_factory_; |
| 306 }; | 310 }; |
| 307 | 311 |
| 308 } // namespace net | 312 } // namespace net |
| 309 | 313 |
| 310 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 314 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
| OLD | NEW |