| Index: content/browser/loader/throttling_resource_handler.cc
|
| diff --git a/content/browser/loader/throttling_resource_handler.cc b/content/browser/loader/throttling_resource_handler.cc
|
| index 93b9ad74836b88f74ffe3cf54a3b7c0789ab0f20..676cad7a4a40b32970d763abfb0a9dd92e69866b 100644
|
| --- a/content/browser/loader/throttling_resource_handler.cc
|
| +++ b/content/browser/loader/throttling_resource_handler.cc
|
| @@ -5,6 +5,7 @@
|
| #include "content/browser/loader/throttling_resource_handler.h"
|
|
|
| #include <utility>
|
| +#include "base/trace_event/trace_event.h"
|
|
|
| #include "content/browser/loader/resource_request_info_impl.h"
|
| #include "content/public/browser/resource_throttle.h"
|
| @@ -31,6 +32,8 @@ ThrottlingResourceHandler::ThrottlingResourceHandler(
|
| }
|
|
|
| ThrottlingResourceHandler::~ThrottlingResourceHandler() {
|
| + TRACE_EVENT0("toplevel",
|
| + "ThrottlingResourceHandler::~ThrottlingResourceHandler");
|
| }
|
|
|
| bool ThrottlingResourceHandler::OnRequestRedirected(
|
| @@ -61,17 +64,24 @@ bool ThrottlingResourceHandler::OnRequestRedirected(
|
| }
|
|
|
| bool ThrottlingResourceHandler::OnWillStart(const GURL& url, bool* defer) {
|
| + TRACE_EVENT0("toplevel", "ThrottlingResourceHandler::OnWillStart");
|
| DCHECK(!cancelled_by_resource_throttle_);
|
|
|
| *defer = false;
|
| while (next_index_ < throttles_.size()) {
|
| int index = next_index_;
|
| - throttles_[index]->WillStartRequest(defer);
|
| + {
|
| + TRACE_EVENT0("toplevel", "Throttle::OnWillStartRequest");
|
| + throttles_[index]->WillStartRequest(defer);
|
| + }
|
| next_index_++;
|
| if (cancelled_by_resource_throttle_)
|
| return false;
|
| if (*defer) {
|
| - OnRequestDefered(index);
|
| + {
|
| + TRACE_EVENT0("toplevel", "ThrottlingResourceHandler::OnRequestDefered");
|
| + OnRequestDefered(index);
|
| + }
|
| deferred_stage_ = DEFERRED_START;
|
| deferred_url_ = url;
|
| return true; // Do not cancel.
|
| @@ -109,6 +119,8 @@ bool ThrottlingResourceHandler::OnBeforeNetworkStart(const GURL& url,
|
|
|
| bool ThrottlingResourceHandler::OnResponseStarted(ResourceResponse* response,
|
| bool* defer) {
|
| + TRACE_EVENT0("toplevel", "ThrottlingResourceHandler::OnResponseStarted");
|
| +
|
| DCHECK(!cancelled_by_resource_throttle_);
|
|
|
| while (next_index_ < throttles_.size()) {
|
|
|