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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2623383005: Log states of JobController in Net MemoryDumpProvider (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.h ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 052a17e3da2ab5a6d5a396109eb900c3d88ba903..c04c240092ef4a7ee9ebbd584066e6de1a345481 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -628,6 +628,23 @@ void HttpStreamFactoryImpl::JobController::MaybeSetWaitTimeForMainJob(
main_job_wait_time_ = delay;
}
+bool HttpStreamFactoryImpl::JobController::HasPendingMainJob() const {
+ return main_job_.get() != nullptr;
+}
+
+bool HttpStreamFactoryImpl::JobController::HasPendingAltJob() const {
+ return alternative_job_.get() != nullptr;
+}
+
+size_t HttpStreamFactoryImpl::JobController::EstimateMemoryUsage() const {
+ size_t estimated_size = 0;
+ if (main_job_)
+ estimated_size += main_job_->EstimateMemoryUsage();
+ if (alternative_job_)
+ estimated_size += alternative_job_->EstimateMemoryUsage();
+ return estimated_size;
+}
+
WebSocketHandshakeStreamBase::CreateHelper* HttpStreamFactoryImpl::
JobController::websocket_handshake_stream_create_helper() {
DCHECK(request_);
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.h ('k') | net/socket/client_socket_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698