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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2799093004: Enable ServerTiming support
Patch Set: Created 3 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
Index: third_party/WebKit/Source/core/loader/DocumentLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
index 74025934ae868e7ed81e4722e04c809fc9f06e4a..900d0eb8f74ae503212581975d1941a9a26058e6 100644
--- a/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
@@ -61,6 +61,8 @@
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
#include "core/probe/CoreProbes.h"
+#include "core/timing/DOMWindowPerformance.h"
+#include "core/timing/Performance.h"
#include "platform/HTTPNames.h"
#include "platform/UserGestureIndicator.h"
#include "platform/feature_policy/FeaturePolicy.h"
@@ -956,6 +958,13 @@ void DocumentLoader::didInstallNewDocument(Document* document) {
document->parseAndSetReferrerPolicy(referrerPolicyHeader);
}
+ if (RuntimeEnabledFeatures::serverTimingEnabled() &&
+ m_frame->document()->domWindow()) {
+ DOMWindowPerformance::performance(*(m_frame->document()->domWindow()))
+ ->addServerTiming(m_response,
+ PerformanceBase::ShouldAddToBuffer::Always);
+ }
+
localFrameClient().didCreateNewDocument();
}

Powered by Google App Engine
This is Rietveld 408576698