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

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

Issue 1532873003: PlzNavigate: add initial traces for new TBM benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crash issue for synchronous navigations. 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.cc
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
index 2cae9a6237240334d3d026ea6b1d5f5075744b9b..939c8d8481592087161502bf2cd5dd1969ebbce4 100644
--- a/content/browser/loader/navigation_url_loader_impl.cc
+++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/trace_event/trace_event.h"
#include "content/browser/frame_host/navigation_request_info.h"
#include "content/browser/loader/navigation_url_loader_delegate.h"
#include "content/browser/loader/navigation_url_loader_impl_core.h"
@@ -25,6 +26,15 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl(
DCHECK_CURRENTLY_ON(BrowserThread::UI);
core_ = new NavigationURLLoaderImplCore(weak_factory_.GetWeakPtr());
+
+ // TODO(carlosk): extend this trace to support non-PlzNavigate navigations.
+ // For the trace below we're using the NavigationURLLoaderImplCore as the
+ // async trace id, |navigation_start| as the timestamp and reporting the
+ // FrameTreeNode id as a parameter.
+ TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1(
+ "navigation", "Navigation timeToResponseStarted", core_,
+ request_info->common_params.navigation_start.ToInternalValue(),
+ "FrameTreeNode id", request_info->frame_tree_node_id);
ServiceWorkerNavigationHandleCore* service_worker_handle_core =
service_worker_handle ? service_worker_handle->core() : nullptr;
BrowserThread::PostTask(
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/loader/navigation_url_loader_impl_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698