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

Unified Diff: third_party/WebKit/Source/web/WebFrame.cpp

Issue 2712773002: Add trace event for detecting main frame in loading metrics. (Closed)
Patch Set: fix condition Created 3 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 | « no previous file | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebFrame.cpp
diff --git a/third_party/WebKit/Source/web/WebFrame.cpp b/third_party/WebKit/Source/web/WebFrame.cpp
index 943f73840668f5e565edc7011d5627d5dbd4723e..59df86f0c71e8dce1b85eb387ee2e9d37f4e6b41 100644
--- a/third_party/WebKit/Source/web/WebFrame.cpp
+++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -15,6 +15,7 @@
#include "core/page/Page.h"
#include "platform/UserGestureIndicator.h"
#include "platform/heap/Handle.h"
+#include "platform/instrumentation/tracing/TraceEvent.h"
#include "public/web/WebElement.h"
#include "public/web/WebFrameOwnerProperties.h"
#include "public/web/WebSandboxFlags.h"
@@ -99,6 +100,10 @@ bool WebFrame::swap(WebFrame* frame) {
toHTMLFrameOwnerElement(owner)->setWidget(localFrame.view());
} else {
localFrame.page()->setMainFrame(&localFrame);
+ // This trace event is needed to detect the main frame of the
+ // renderer in telemetry metrics. See crbug.com/692112#c11.
+ TRACE_EVENT_INSTANT1("loading", "markAsMainFrame",
+ TRACE_EVENT_SCOPE_THREAD, "frame", &localFrame);
}
} else {
toWebRemoteFrameImpl(frame)->initializeCoreFrame(host, owner, name,
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698