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

Unified Diff: content/browser/loader/throttling_resource_handler.cc

Issue 1569673002: [NOT FOR LANDING] Detailed loading traces Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 | « content/browser/loader/sync_resource_handler.cc ('k') | content/public/browser/browser_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « content/browser/loader/sync_resource_handler.cc ('k') | content/public/browser/browser_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698