diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 20:11:53 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-04 20:11:53 +0000 |
commit | f8fe5cf6449af0c8f096b1c2e38b3c76c1c923cb (patch) | |
tree | 360be63caedeab943cc4d8c936b112ce0868d2e6 /content/browser/loader/async_resource_handler.cc | |
parent | 8f89638bcddd0325782e4b3bd1c4eaaf8f6fcc52 (diff) | |
download | chromium_src-f8fe5cf6449af0c8f096b1c2e38b3c76c1c923cb.zip chromium_src-f8fe5cf6449af0c8f096b1c2e38b3c76c1c923cb.tar.gz chromium_src-f8fe5cf6449af0c8f096b1c2e38b3c76c1c923cb.tar.bz2 |
Make resource throttles and AsyncResourceHandler add events to NetLog
when they block a request. This is aimed at making issues easier to
debug when a delegate defers an request for significant periods of time.
Also display that information in about:net-internals when a request is
already active and blocked on a delegate.
BUG=94920
Review URL: https://codereview.chromium.org/25108004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/async_resource_handler.cc')
-rw-r--r-- | content/browser/loader/async_resource_handler.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/loader/async_resource_handler.cc b/content/browser/loader/async_resource_handler.cc index 5983052..93d7e83 100644 --- a/content/browser/loader/async_resource_handler.cc +++ b/content/browser/loader/async_resource_handler.cc @@ -151,6 +151,7 @@ bool AsyncResourceHandler::OnRequestRedirected(int request_id, return false; *defer = did_defer_ = true; + OnDefer(); if (rdh_->delegate()) { rdh_->delegate()->OnRequestRedirected( @@ -287,6 +288,7 @@ bool AsyncResourceHandler::OnReadCompleted(int request_id, int bytes_read, "Net.AsyncResourceHandler_PendingDataCount_WhenFull", pending_data_count_, 0, 100, 100); *defer = did_defer_ = true; + OnDefer(); } return true; @@ -377,8 +379,13 @@ bool AsyncResourceHandler::EnsureResourceBufferIsInitialized() { void AsyncResourceHandler::ResumeIfDeferred() { if (did_defer_) { did_defer_ = false; + request()->LogUnblocked(); controller()->Resume(); } } +void AsyncResourceHandler::OnDefer() { + request()->LogBlockedBy("AsyncResourceHandler"); +} + } // namespace content |