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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.cpp

Issue 2655143002: Drop replacesCurrentHistoryItem, NavigationType (Closed)
Patch Set: More compile fixes Created 3 years, 11 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/timing/PerformanceBase.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
index 04e8fc0b0b398e32535bdb89324120857e360e88..f3af059feb3d2ff46c1f9b79da570e87d17a81bc 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
@@ -81,21 +81,23 @@ PerformanceBase::PerformanceBase(double timeOrigin,
PerformanceBase::~PerformanceBase() {}
PerformanceNavigationTiming::NavigationType PerformanceBase::getNavigationType(
- NavigationType type,
+ FrameLoadType type,
const Document* document) {
if (document &&
document->pageVisibilityState() == PageVisibilityStatePrerender) {
return PerformanceNavigationTiming::NavigationType::Prerender;
}
switch (type) {
- case NavigationTypeReload:
+ case FrameLoadTypeReload:
+ case FrameLoadTypeReloadMainResource:
return PerformanceNavigationTiming::NavigationType::Reload;
- case NavigationTypeBackForward:
+ case FrameLoadTypeBackForward:
+ case FrameLoadTypeInitialHistoryLoad:
return PerformanceNavigationTiming::NavigationType::BackForward;
- case NavigationTypeLinkClicked:
- case NavigationTypeFormSubmitted:
- case NavigationTypeFormResubmitted:
- case NavigationTypeOther:
+ case FrameLoadTypeStandard:
+ case FrameLoadTypeReplaceCurrentItem:
+ case FrameLoadTypeInitialInChildFrame:
+ case FrameLoadTypeReloadBypassingCache:
return PerformanceNavigationTiming::NavigationType::Navigate;
}
NOTREACHED();
@@ -386,7 +388,7 @@ void PerformanceBase::addNavigationTiming(LocalFrame* frame) {
unsigned long long decodedBodyLength = finalResponse.decodedBodyLength();
bool didReuseConnection = finalResponse.connectionReused();
PerformanceNavigationTiming::NavigationType type =
- getNavigationType(documentLoader->getNavigationType(), frame->document());
+ getNavigationType(documentLoader->loadType(), frame->document());
m_navigationTiming = new PerformanceNavigationTiming(
timeOrigin(), documentLoadTiming.unloadEventStart(),
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceBase.h ('k') | third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698