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

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 1825533002: Navigation start to commit trace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing label of starting URL Created 4 years, 8 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 | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index dde5fa77087d7a6db28a97b0a27ce56ffa045e43..9b3cd410d935630a773a9c36b0a3791b4f76645a 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -68,6 +68,12 @@ NavigationHandleImpl::NavigationHandleImpl(
pending_nav_entry_id_(pending_nav_entry_id) {
DCHECK(!navigation_start.is_null());
GetDelegate()->DidStartNavigation(this);
+
+ if (IsInMainFrame()) {
+ TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1(
+ "navigation", "Navigation StartToCommit", this,
+ navigation_start.ToInternalValue(), "Initial URL", url_.spec());
+ }
}
NavigationHandleImpl::~NavigationHandleImpl() {
@@ -77,6 +83,12 @@ NavigationHandleImpl::~NavigationHandleImpl() {
// destroyed in the middle of the NavigationThrottles checks.
if (!IsBrowserSideNavigationEnabled() && !complete_callback_.is_null())
RunCompleteCallback(NavigationThrottle::CANCEL_AND_IGNORE);
+
+ if (IsInMainFrame()) {
+ TRACE_EVENT_ASYNC_END2("navigation", "Navigation StartToCommit", this,
+ "URL", url_.spec(), "Net Error Code",
+ net_error_code_);
+ }
}
NavigatorDelegate* NavigationHandleImpl::GetDelegate() const {
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698