| 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/base/privacy_mode.h" | 9 #include "net/base/privacy_mode.h" |
| 10 #include "net/http/http_stream_factory_impl_job.h" | 10 #include "net/http/http_stream_factory_impl_job.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 const NetLogWithSource* GetNetLog() const override; | 166 const NetLogWithSource* GetNetLog() const override; |
| 167 | 167 |
| 168 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override; | 168 void MaybeSetWaitTimeForMainJob(const base::TimeDelta& delay) override; |
| 169 | 169 |
| 170 WebSocketHandshakeStreamBase::CreateHelper* | 170 WebSocketHandshakeStreamBase::CreateHelper* |
| 171 websocket_handshake_stream_create_helper() override; | 171 websocket_handshake_stream_create_helper() override; |
| 172 | 172 |
| 173 bool is_preconnect() const { return is_preconnect_; } | 173 bool is_preconnect() const { return is_preconnect_; } |
| 174 | 174 |
| 175 // Returns true if |this| has a pending request that is not completed. |
| 176 bool HasPendingRequest() const { return request_ != nullptr; } |
| 177 |
| 175 // Returns true if |this| has a pending main job that is not completed. | 178 // Returns true if |this| has a pending main job that is not completed. |
| 176 bool HasPendingMainJob() const; | 179 bool HasPendingMainJob() const; |
| 177 | 180 |
| 178 // Returns true if |this| has a pending alternative job that is not completed. | 181 // Returns true if |this| has a pending alternative job that is not completed. |
| 179 bool HasPendingAltJob() const; | 182 bool HasPendingAltJob() const; |
| 180 | 183 |
| 181 // Returns the estimated memory usage in bytes. | 184 // Returns the estimated memory usage in bytes. |
| 182 size_t EstimateMemoryUsage() const; | 185 size_t EstimateMemoryUsage() const; |
| 183 | 186 |
| 184 private: | 187 private: |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 PrivacyMode privacy_mode_; | 335 PrivacyMode privacy_mode_; |
| 333 | 336 |
| 334 const NetLogWithSource net_log_; | 337 const NetLogWithSource net_log_; |
| 335 | 338 |
| 336 base::WeakPtrFactory<JobController> ptr_factory_; | 339 base::WeakPtrFactory<JobController> ptr_factory_; |
| 337 }; | 340 }; |
| 338 | 341 |
| 339 } // namespace net | 342 } // namespace net |
| 340 | 343 |
| 341 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ | 344 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_CONTROLLER_H_ |
| OLD | NEW |