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 2962113002: Updates to Server-Timing in accordance with with spec changes (Closed)
Patch Set: Created 3 years, 5 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"
11 #include "core/loader/DocumentLoadTiming.h" 11 #include "core/loader/DocumentLoadTiming.h"
12 #include "core/loader/DocumentLoader.h" 12 #include "core/loader/DocumentLoader.h"
13 #include "core/timing/PerformanceBase.h" 13 #include "core/timing/PerformanceBase.h"
14 #include "platform/loader/fetch/ResourceTimingInfo.h" 14 #include "platform/loader/fetch/ResourceTimingInfo.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 PerformanceNavigationTiming::PerformanceNavigationTiming( 18 PerformanceNavigationTiming::PerformanceNavigationTiming(
19 LocalFrame* frame, 19 LocalFrame* frame,
20 ResourceTimingInfo* info, 20 ResourceTimingInfo* info,
21 double time_origin) 21 double time_origin,
22 PerformanceServerTimingVector& serverTiming)
22 : PerformanceResourceTiming(info ? info->InitialURL().GetString() : "", 23 : PerformanceResourceTiming(info ? info->InitialURL().GetString() : "",
23 "navigation", 24 "navigation",
24 0.0, 25 0.0,
25 0.0), 26 0.0,
27 serverTiming),
26 ContextClient(frame), 28 ContextClient(frame),
27 time_origin_(time_origin), 29 time_origin_(time_origin),
28 resource_timing_info_(info) { 30 resource_timing_info_(info) {
29 DCHECK(frame); 31 DCHECK(frame);
30 DCHECK(info); 32 DCHECK(info);
31 } 33 }
32 34
33 PerformanceNavigationTiming::~PerformanceNavigationTiming() {} 35 PerformanceNavigationTiming::~PerformanceNavigationTiming() {}
34 36
35 DEFINE_TRACE(PerformanceNavigationTiming) { 37 DEFINE_TRACE(PerformanceNavigationTiming) {
36 ContextClient::Trace(visitor); 38 ContextClient::Trace(visitor);
37 PerformanceEntry::Trace(visitor); 39 PerformanceResourceTiming::Trace(visitor);
38 } 40 }
39 41
40 DocumentLoadTiming* PerformanceNavigationTiming::GetDocumentLoadTiming() const { 42 DocumentLoadTiming* PerformanceNavigationTiming::GetDocumentLoadTiming() const {
41 DocumentLoader* loader = GetDocumentLoader(); 43 DocumentLoader* loader = GetDocumentLoader();
42 if (!loader) 44 if (!loader)
43 return nullptr; 45 return nullptr;
44 46
45 return &loader->GetTiming(); 47 return &loader->GetTiming();
46 } 48 }
47 49
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 builder.AddNumber("domInteractive", domInteractive()); 265 builder.AddNumber("domInteractive", domInteractive());
264 builder.AddNumber("domContentLoadedEventStart", domContentLoadedEventStart()); 266 builder.AddNumber("domContentLoadedEventStart", domContentLoadedEventStart());
265 builder.AddNumber("domContentLoadedEventEnd", domContentLoadedEventEnd()); 267 builder.AddNumber("domContentLoadedEventEnd", domContentLoadedEventEnd());
266 builder.AddNumber("domComplete", domComplete()); 268 builder.AddNumber("domComplete", domComplete());
267 builder.AddNumber("loadEventStart", loadEventStart()); 269 builder.AddNumber("loadEventStart", loadEventStart());
268 builder.AddNumber("loadEventEnd", loadEventEnd()); 270 builder.AddNumber("loadEventEnd", loadEventEnd());
269 builder.AddString("type", type()); 271 builder.AddString("type", type());
270 builder.AddNumber("redirectCount", redirectCount()); 272 builder.AddNumber("redirectCount", redirectCount());
271 } 273 }
272 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698