Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: net/http/http_stream_factory_impl_job_controller.h

Issue 2619583002: Clean up HttpStreamFactoryImpl::JobController when Impl::Jobs complete (Closed)
Patch Set: self review Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 // Must be called when |alternative_job_| fails. 208 // Must be called when |alternative_job_| fails.
209 void OnAlternativeJobFailed(Job* job); 209 void OnAlternativeJobFailed(Job* job);
210 210
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. 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 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay); 219 void MaybeResumeMainJob(Job* job, const base::TimeDelta& delay);
219 220
220 void ResumeMainJob(); 221 void ResumeMainJob();
221 222
222 // Returns true if QUIC is whitelisted for |host|. 223 // Returns true if QUIC is whitelisted for |host|.
223 bool IsQuicWhitelistedForHost(const std::string& host); 224 bool IsQuicWhitelistedForHost(const std::string& host);
224 225
225 AlternativeService GetAlternativeServiceFor( 226 AlternativeService GetAlternativeServiceFor(
226 const HttpRequestInfo& request_info, 227 const HttpRequestInfo& request_info,
227 HttpStreamRequest::Delegate* delegate, 228 HttpStreamRequest::Delegate* delegate,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 298
298 // True if an alternative proxy server job can be started to fetch |request_|. 299 // True if an alternative proxy server job can be started to fetch |request_|.
299 bool can_start_alternative_proxy_job_; 300 bool can_start_alternative_proxy_job_;
300 301
301 base::WeakPtrFactory<JobController> ptr_factory_; 302 base::WeakPtrFactory<JobController> ptr_factory_;
302 }; 303 };
303 304
304 } // namespace net 305 } // namespace net
305 306
306 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ 307 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698