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

Unified Diff: extensions/browser/api/web_request/web_request_api.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/public/browser/browser_message_filter.cc ('k') | net/base/ip_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/web_request/web_request_api.cc
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index aa799bbe459cf3a32a24607a19e377baddbd6a46..cb4c54742824de592b98d9606dce8f8fd7807bd9 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -616,17 +616,23 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
net::URLRequest* request,
const net::CompletionCallback& callback,
GURL* new_url) {
+ TRACE_EVENT0("toplevel", "ExtensionWebRequestEventRouter::OnBeforeRequest");
+
if (ShouldHideEvent(browser_context, extension_info_map, request))
return net::OK;
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::A");
if (IsPageLoad(request))
NotifyPageLoad();
-
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::B");
request_time_tracker_->LogRequestStartTime(request->identifier(),
base::Time::Now(),
request->url(),
browser_context);
-
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::C");
// Whether to initialized |blocked_requests_|.
bool initialize_blocked_requests = false;
@@ -634,11 +640,14 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
ProcessDeclarativeRules(browser_context, extension_info_map,
web_request::OnBeforeRequest::kEventName, request,
ON_BEFORE_REQUEST, NULL);
-
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::D");
int extra_info_spec = 0;
EventListeners listeners = GetMatchingListeners(
browser_context, extension_info_map,
web_request::OnBeforeRequest::kEventName, request, &extra_info_spec);
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::E");
if (!listeners.empty() &&
!GetAndSetSignaled(request->identifier(), kOnBeforeRequest)) {
scoped_ptr<WebRequestEventDetails> event_details(
@@ -648,7 +657,8 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
initialize_blocked_requests |= DispatchEvent(
browser_context, request, listeners, std::move(event_details));
}
-
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::F");
if (!initialize_blocked_requests)
return net::OK; // Nobody saw a reason for modifying the request.
@@ -659,7 +669,8 @@ int ExtensionWebRequestEventRouter::OnBeforeRequest(
blocked_request.callback = callback;
blocked_request.new_url = new_url;
blocked_request.net_log = &request->net_log();
-
+ TRACE_EVENT0("toplevel",
+ "ExtensionWebRequestEventRouter::OnBeforeRequest::G");
if (blocked_request.num_handlers_blocking == 0) {
// If there are no blocking handlers, only the declarative rules tried
// to modify the request and we can respond synchronously.
« no previous file with comments | « content/public/browser/browser_message_filter.cc ('k') | net/base/ip_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698