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

Unified Diff: components/subresource_filter/content/renderer/document_subresource_filter.cc

Issue 2160323002: Add tracing for DocumentSubresourceFilter::allowLoad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sbsf_dsf
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/subresource_filter/content/renderer/document_subresource_filter.cc
diff --git a/components/subresource_filter/content/renderer/document_subresource_filter.cc b/components/subresource_filter/content/renderer/document_subresource_filter.cc
index 3b55625b516e1dd53389ba301214e10e3dee32da..f1e4fcebce86070a5773899b2e311ad1a8191a18 100644
--- a/components/subresource_filter/content/renderer/document_subresource_filter.cc
+++ b/components/subresource_filter/content/renderer/document_subresource_filter.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
+#include "base/trace_event/trace_event.h"
#include "components/subresource_filter/core/common/memory_mapped_ruleset.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "url/gurl.h"
@@ -29,6 +30,8 @@ DocumentSubresourceFilter::~DocumentSubresourceFilter() = default;
bool DocumentSubresourceFilter::allowLoad(
const blink::WebURL& resourceUrl,
blink::WebURLRequest::RequestContext /* ignored */) {
+ TRACE_EVENT1("loader", "DocumentSubresourceFilter::allowLoad", "url",
+ resourceUrl.string().utf8());
++num_loads_evaluated_;
if (DoesLoadMatchFilteringRules(GURL(resourceUrl))) {
++num_loads_matching_rules_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698