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

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

Issue 2799093004: Enable ServerTiming support
Patch Set: updates for Patch Set 7 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 e3a8c51eae71d0c0d750835cbf63215175798993..e1bd3013247a87e4844e1a656438b04c37dd9f3a 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"
@@ -128,8 +130,8 @@ LocalFrameClient& DocumentLoader::GetLocalFrameClient() const {
DCHECK(frame_);
LocalFrameClient* client = frame_->Client();
// LocalFrame clears its |m_client| only after detaching all DocumentLoaders
- // (i.e. calls detachFromFrame() which clears |m_frame|) owned by the
- // LocalFrame's FrameLoader. So, if |m_frame| is non nullptr, |client| is
+ // (i.e. calls detachFromFrame() which clears |frame_|) owned by the
+ // LocalFrame's FrameLoader. So, if |frame_| is non nullptr, |client| is
// also non nullptr.
DCHECK(client);
return *client;
@@ -934,6 +936,13 @@ void DocumentLoader::DidInstallNewDocument(Document* document) {
document->ParseAndSetReferrerPolicy(referrer_policy_header);
}
+ if (RuntimeEnabledFeatures::serverTimingEnabled() &&
+ frame_->GetDocument()->domWindow()) {
+ DOMWindowPerformance::performance(*(frame_->GetDocument()->domWindow()))
+ ->AddServerTiming(response_,
+ PerformanceBase::ShouldAddToBuffer::Always);
+ }
+
GetLocalFrameClient().DidCreateNewDocument();
}
@@ -1044,7 +1053,7 @@ void DocumentLoader::InstallNewDocument(
// that the name would be nulled and if the name is accessed after we will
// fire a UseCounter. If we decide to move forward with this change, we'd
// actually clean the name here.
- // m_frame->tree().setName(nullAtom);
+ // frame_->tree().setName(nullAtom);
frame_->Tree().ExperimentalSetNulledName();
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698