| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override; | 162 void RemoveRequestFromSpdySessionRequestMapForJob(Job* job) override; |
| 163 const NetLogWithSource* GetNetLog(Job* job) const override; | 163 const NetLogWithSource* GetNetLog(Job* job) const override; |
| 164 | 164 |
| 165 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override; | 165 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override; |
| 166 | 166 |
| 167 WebSocketHandshakeStreamBase::CreateHelper* | 167 WebSocketHandshakeStreamBase::CreateHelper* |
| 168 websocket_handshake_stream_create_helper() override; | 168 websocket_handshake_stream_create_helper() override; |
| 169 | 169 |
| 170 bool is_preconnect() const { return is_preconnect_; } | 170 bool is_preconnect() const { return is_preconnect_; } |
| 171 | 171 |
| 172 // Returns true if |this| has a pending main job that is not completed. |
| 173 bool HasPendingMainJob() const; |
| 174 |
| 175 // Returns true if |this| has a pending alternative job that is not completed. |
| 176 bool HasPendingAltJob() const; |
| 177 |
| 178 // Returns the estimated memory usage in bytes. |
| 179 size_t EstimateMemoryUsage() const; |
| 180 |
| 172 private: | 181 private: |
| 173 friend class JobControllerPeer; | 182 friend class JobControllerPeer; |
| 174 | 183 |
| 175 // Creates Job(s) for |request_|. Job(s) will be owned by |this|. | 184 // Creates Job(s) for |request_|. Job(s) will be owned by |this|. |
| 176 void CreateJobs(const HttpRequestInfo& request_info, | 185 void CreateJobs(const HttpRequestInfo& request_info, |
| 177 RequestPriority priority, | 186 RequestPriority priority, |
| 178 const SSLConfig& server_ssl_config, | 187 const SSLConfig& server_ssl_config, |
| 179 const SSLConfig& proxy_ssl_config, | 188 const SSLConfig& proxy_ssl_config, |
| 180 HttpStreamRequest::Delegate* delegate, | 189 HttpStreamRequest::Delegate* delegate, |
| 181 HttpStreamRequest::StreamType stream_type, | 190 HttpStreamRequest::StreamType stream_type, |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 310 |
| 302 // True if an alternative proxy server job can be started to fetch |request_|. | 311 // True if an alternative proxy server job can be started to fetch |request_|. |
| 303 bool can_start_alternative_proxy_job_; | 312 bool can_start_alternative_proxy_job_; |
| 304 | 313 |
| 305 base::WeakPtrFactory<JobController> ptr_factory_; | 314 base::WeakPtrFactory<JobController> ptr_factory_; |
| 306 }; | 315 }; |
| 307 | 316 |
| 308 } // namespace net | 317 } // namespace net |
| 309 | 318 |
| 310 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 319 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
| OLD | NEW |