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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceNavigationTiming.cpp

Issue 2429063002: Implement nextHopProtocol in PerformanceResourceTiming and PerformanceNavigationTiming.
Patch Set: included changes for navigation timing 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/timing/PerformanceNavigationTiming.h" 5 #include "core/timing/PerformanceNavigationTiming.h"
6 6
7 #include "bindings/core/v8/V8ObjectBuilder.h" 7 #include "bindings/core/v8/V8ObjectBuilder.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/DocumentTiming.h" 9 #include "core/dom/DocumentTiming.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 unsigned long long PerformanceNavigationTiming::getEncodedBodySize() const { 80 unsigned long long PerformanceNavigationTiming::getEncodedBodySize() const {
81 return m_resourceTimingInfo->finalResponse().encodedBodyLength(); 81 return m_resourceTimingInfo->finalResponse().encodedBodyLength();
82 } 82 }
83 83
84 unsigned long long PerformanceNavigationTiming::getDecodedBodySize() const { 84 unsigned long long PerformanceNavigationTiming::getDecodedBodySize() const {
85 return m_resourceTimingInfo->finalResponse().decodedBodyLength(); 85 return m_resourceTimingInfo->finalResponse().decodedBodyLength();
86 } 86 }
87 87
88 AtomicString PerformanceNavigationTiming::alpnNegotiatedProtocol() const {
89 return m_resourceTimingInfo->finalResponse().alpnNegotiatedProtocol();
90 }
91
92 AtomicString PerformanceNavigationTiming::connectionInfo() const {
93 return m_resourceTimingInfo->finalResponse().connectionInfo();
94 }
95
88 AtomicString PerformanceNavigationTiming::getNavigationType( 96 AtomicString PerformanceNavigationTiming::getNavigationType(
89 NavigationType type, 97 NavigationType type,
90 const Document* document) { 98 const Document* document) {
91 if (document && 99 if (document &&
92 document->pageVisibilityState() == PageVisibilityStatePrerender) { 100 document->pageVisibilityState() == PageVisibilityStatePrerender) {
93 return "prerender"; 101 return "prerender";
94 } 102 }
95 switch (type) { 103 switch (type) {
96 case NavigationTypeReload: 104 case NavigationTypeReload:
97 return "reload"; 105 return "reload";
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 builder.addNumber("domInteractive", domInteractive()); 267 builder.addNumber("domInteractive", domInteractive());
260 builder.addNumber("domContentLoadedEventStart", domContentLoadedEventStart()); 268 builder.addNumber("domContentLoadedEventStart", domContentLoadedEventStart());
261 builder.addNumber("domContentLoadedEventEnd", domContentLoadedEventEnd()); 269 builder.addNumber("domContentLoadedEventEnd", domContentLoadedEventEnd());
262 builder.addNumber("domComplete", domComplete()); 270 builder.addNumber("domComplete", domComplete());
263 builder.addNumber("loadEventStart", loadEventStart()); 271 builder.addNumber("loadEventStart", loadEventStart());
264 builder.addNumber("loadEventEnd", loadEventEnd()); 272 builder.addNumber("loadEventEnd", loadEventEnd());
265 builder.addString("type", type()); 273 builder.addString("type", type());
266 builder.addNumber("redirectCount", redirectCount()); 274 builder.addNumber("redirectCount", redirectCount());
267 } 275 }
268 } 276 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698