Chromium Code Reviews| 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 4b73798487a884698755864ec7499d0944848da8..30cfb062a2f5a3ae03a314014d82cdad5a59cda6 100644 |
| --- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| +++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| @@ -309,12 +309,15 @@ void PerformanceBase::addResourceTiming(const ResourceTimingInfo& info) { |
| addResourceTimingBuffer(*entry); |
| } |
| -void PerformanceBase::addNavigationTiming(LocalFrame* frame) { |
| +void PerformanceBase::addNavigationTiming( |
| + LocalFrame* frame, |
| + ResourceTimingInfo* resourceTimingInfo) { |
| if (!RuntimeEnabledFeatures::performanceNavigationTiming2Enabled()) |
| return; |
| DCHECK(frame); |
| const DocumentLoader* documentLoader = frame->loader().documentLoader(); |
| DCHECK(documentLoader); |
| + |
| const DocumentLoadTiming& documentLoadTiming = documentLoader->timing(); |
| const DocumentTiming* documentTiming = |
| @@ -331,7 +334,8 @@ void PerformanceBase::addNavigationTiming(LocalFrame* frame) { |
| double finishTime = documentLoadTiming.loadEventEnd(); |
| // TODO(sunjian) Implement transfer size. crbug/663187 |
|
Yoav Weiss
2016/11/18 10:06:30
You can remove the TODO
sunjian
2016/11/18 20:23:29
Done.
|
| - unsigned long long transferSize = 0; |
| + unsigned long long transferSize = |
| + resourceTimingInfo ? resourceTimingInfo->transferSize() : 0; |
| unsigned long long encodedBodyLength = finalResponse.encodedBodyLength(); |
| unsigned long long decodedBodyLength = finalResponse.decodedBodyLength(); |
| bool didReuseConnection = finalResponse.connectionReused(); |