OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 if (!RuntimeEnabledFeatures::PerformanceNavigationTiming2Enabled()) | 139 if (!RuntimeEnabledFeatures::PerformanceNavigationTiming2Enabled()) |
140 return nullptr; | 140 return nullptr; |
141 if (!GetFrame()) | 141 if (!GetFrame()) |
142 return nullptr; | 142 return nullptr; |
143 const DocumentLoader* document_loader = | 143 const DocumentLoader* document_loader = |
144 GetFrame()->Loader().GetDocumentLoader(); | 144 GetFrame()->Loader().GetDocumentLoader(); |
145 DCHECK(document_loader); | 145 DCHECK(document_loader); |
146 ResourceTimingInfo* info = document_loader->GetNavigationTimingInfo(); | 146 ResourceTimingInfo* info = document_loader->GetNavigationTimingInfo(); |
147 if (!info) | 147 if (!info) |
148 return nullptr; | 148 return nullptr; |
149 return new PerformanceNavigationTiming(GetFrame(), info, TimeOrigin()); | 149 PerformanceServerTimingVector serverTiming = ParseServerTiming(*info, true); |
Yoav Weiss
2017/06/29 06:57:33
It's hard to know what "true" here means from the
| |
150 return new PerformanceNavigationTiming(GetFrame(), info, TimeOrigin(), | |
151 serverTiming); | |
150 } | 152 } |
151 | 153 |
152 void Performance::UpdateLongTaskInstrumentation() { | 154 void Performance::UpdateLongTaskInstrumentation() { |
153 DCHECK(GetFrame()); | 155 DCHECK(GetFrame()); |
154 if (!GetFrame()->GetDocument()) | 156 if (!GetFrame()->GetDocument()) |
155 return; | 157 return; |
156 | 158 |
157 if (HasObserverFor(PerformanceEntry::kLongTask)) { | 159 if (HasObserverFor(PerformanceEntry::kLongTask)) { |
158 UseCounter::Count(&GetFrame()->LocalFrameRoot(), | 160 UseCounter::Count(&GetFrame()->LocalFrameRoot(), |
159 WebFeature::kLongTaskObserver); | 161 WebFeature::kLongTaskObserver); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
257 culprit_dom_window->GetFrame()->DeprecatedLocalOwner(); | 259 culprit_dom_window->GetFrame()->DeprecatedLocalOwner(); |
258 AddLongTaskTiming( | 260 AddLongTaskTiming( |
259 start_time, end_time, attribution.first, | 261 start_time, end_time, attribution.first, |
260 GetFrameAttribute(frame_owner, HTMLNames::srcAttr, false), | 262 GetFrameAttribute(frame_owner, HTMLNames::srcAttr, false), |
261 GetFrameAttribute(frame_owner, HTMLNames::idAttr, false), | 263 GetFrameAttribute(frame_owner, HTMLNames::idAttr, false), |
262 GetFrameAttribute(frame_owner, HTMLNames::nameAttr, true)); | 264 GetFrameAttribute(frame_owner, HTMLNames::nameAttr, true)); |
263 } | 265 } |
264 } | 266 } |
265 | 267 |
266 } // namespace blink | 268 } // namespace blink |
OLD | NEW |