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 = |
| 150 PerformanceServerTiming::ParseServerTiming( |
| 151 *info, PerformanceServerTiming::ShouldAllowTimingDetails::Yes); |
| 152 return new PerformanceNavigationTiming(GetFrame(), info, TimeOrigin(), |
| 153 serverTiming); |
150 } | 154 } |
151 | 155 |
152 void Performance::UpdateLongTaskInstrumentation() { | 156 void Performance::UpdateLongTaskInstrumentation() { |
153 DCHECK(GetFrame()); | 157 DCHECK(GetFrame()); |
154 if (!GetFrame()->GetDocument()) | 158 if (!GetFrame()->GetDocument()) |
155 return; | 159 return; |
156 | 160 |
157 if (HasObserverFor(PerformanceEntry::kLongTask)) { | 161 if (HasObserverFor(PerformanceEntry::kLongTask)) { |
158 UseCounter::Count(&GetFrame()->LocalFrameRoot(), | 162 UseCounter::Count(&GetFrame()->LocalFrameRoot(), |
159 WebFeature::kLongTaskObserver); | 163 WebFeature::kLongTaskObserver); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 culprit_dom_window->GetFrame()->DeprecatedLocalOwner(); | 261 culprit_dom_window->GetFrame()->DeprecatedLocalOwner(); |
258 AddLongTaskTiming( | 262 AddLongTaskTiming( |
259 start_time, end_time, attribution.first, | 263 start_time, end_time, attribution.first, |
260 GetFrameAttribute(frame_owner, HTMLNames::srcAttr, false), | 264 GetFrameAttribute(frame_owner, HTMLNames::srcAttr, false), |
261 GetFrameAttribute(frame_owner, HTMLNames::idAttr, false), | 265 GetFrameAttribute(frame_owner, HTMLNames::idAttr, false), |
262 GetFrameAttribute(frame_owner, HTMLNames::nameAttr, true)); | 266 GetFrameAttribute(frame_owner, HTMLNames::nameAttr, true)); |
263 } | 267 } |
264 } | 268 } |
265 | 269 |
266 } // namespace blink | 270 } // namespace blink |
OLD | NEW |