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

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

Issue 1532873003: PlzNavigate: add initial traces for new TBM benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: content/browser/loader/navigation_url_loader_impl_core.cc
diff --git a/content/browser/loader/navigation_url_loader_impl_core.cc b/content/browser/loader/navigation_url_loader_impl_core.cc
index 05d4b654efd8f0b9d601f2f2bff8f8ecd2ec39bc..90a156e23b9a32310b9f754eb4c89793f16d8035 100644
--- a/content/browser/loader/navigation_url_loader_impl_core.cc
+++ b/content/browser/loader/navigation_url_loader_impl_core.cc
@@ -65,6 +65,7 @@ void NavigationURLLoaderImplCore::NotifyRequestRedirected(
const net::RedirectInfo& redirect_info,
ResourceResponse* response) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ TRACE_EVENT_ASYNC_END0("navigation", "Navigation redirectDelay", this);
// Make a copy of the ResourceResponse before it is passed to another thread.
//
@@ -75,11 +76,17 @@ void NavigationURLLoaderImplCore::NotifyRequestRedirected(
BrowserThread::UI, FROM_HERE,
base::Bind(&NavigationURLLoaderImpl::NotifyRequestRedirected, loader_,
redirect_info, response->DeepCopy()));
+ TRACE_EVENT_ASYNC_BEGIN2("navigation", "Navigation redirectDelay", this,
+ "&NavigationURLLoaderImplCore", this, "New URL",
+ redirect_info.new_url.spec());
}
void NavigationURLLoaderImplCore::NotifyResponseStarted(
ResourceResponse* response,
scoped_ptr<StreamHandle> body) {
+ TRACE_EVENT_ASYNC_END0("navigation", "Navigation redirectDelay", this);
clamy 2015/12/18 15:42:11 nit: I would leave the DCHECK_CURRENTLY_ON first.
carlosk 2015/12/18 17:23:21 Done.
+ TRACE_EVENT_ASYNC_END2("navigation", "Navigation timeToResponseStarted", this,
+ "&NavigationURLLoaderImplCore", this, "success", true);
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// If, by the time the task reaches the UI thread, |loader_| has already been
@@ -99,6 +106,10 @@ void NavigationURLLoaderImplCore::NotifyResponseStarted(
void NavigationURLLoaderImplCore::NotifyRequestFailed(bool in_cache,
int net_error) {
+ TRACE_EVENT_ASYNC_END0("navigation", "Navigation redirectDelay", this);
+ TRACE_EVENT_ASYNC_END2("navigation", "Navigation timeToResponseStarted", this,
+ "&NavigationURLLoaderImplCore", this, "success",
+ false);
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserThread::PostTask(

Powered by Google App Engine
This is Rietveld 408576698