| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 if (info.redirectChain().isEmpty()) { | 208 if (info.redirectChain().isEmpty()) { |
| 209 RefPtrWillBeRawPtr<PerformanceEntry> entry = PerformanceResourceTiming::
create(info, initiatorDocument, startTime, allowTimingDetails); | 209 RefPtrWillBeRawPtr<PerformanceEntry> entry = PerformanceResourceTiming::
create(info, initiatorDocument, startTime, allowTimingDetails); |
| 210 addResourceTimingBuffer(entry); | 210 addResourceTimingBuffer(entry); |
| 211 return; | 211 return; |
| 212 } | 212 } |
| 213 | 213 |
| 214 const Vector<ResourceResponse>& redirectChain = info.redirectChain(); | 214 const Vector<ResourceResponse>& redirectChain = info.redirectChain(); |
| 215 bool allowRedirectDetails = allowsTimingRedirect(redirectChain, finalRespons
e, initiatorDocument); | 215 bool allowRedirectDetails = allowsTimingRedirect(redirectChain, finalRespons
e, initiatorDocument); |
| 216 | 216 |
| 217 if (!allowRedirectDetails) { | 217 // ServiceWorker doesn't support TimingInfo. |
| 218 // FIXME: Implement ServiceWorkerURLRequestJob::GetLoadTimingInfo(). |
| 219 if (!allowRedirectDetails && !finalResponse.wasFetchedViaServiceWorker()) { |
| 218 ResourceLoadTiming* finalTiming = finalResponse.resourceLoadTiming(); | 220 ResourceLoadTiming* finalTiming = finalResponse.resourceLoadTiming(); |
| 219 ASSERT(finalTiming); | 221 ASSERT(finalTiming); |
| 220 if (finalTiming) | 222 if (finalTiming) |
| 221 startTime = finalTiming->requestTime; | 223 startTime = finalTiming->requestTime; |
| 222 } | 224 } |
| 223 | 225 |
| 224 ResourceLoadTiming* lastRedirectTiming = redirectChain.last().resourceLoadTi
ming(); | 226 ResourceLoadTiming* lastRedirectTiming = redirectChain.last().resourceLoadTi
ming(); |
| 225 ASSERT(lastRedirectTiming); | 227 ASSERT(lastRedirectTiming); |
| 226 double lastRedirectEndTime = lastRedirectTiming->receiveHeadersEnd; | 228 double lastRedirectEndTime = lastRedirectTiming->receiveHeadersEnd; |
| 227 | 229 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 void Performance::trace(Visitor* visitor) | 280 void Performance::trace(Visitor* visitor) |
| 279 { | 281 { |
| 280 visitor->trace(m_navigation); | 282 visitor->trace(m_navigation); |
| 281 visitor->trace(m_timing); | 283 visitor->trace(m_timing); |
| 282 visitor->trace(m_resourceTimingBuffer); | 284 visitor->trace(m_resourceTimingBuffer); |
| 283 visitor->trace(m_userTiming); | 285 visitor->trace(m_userTiming); |
| 284 EventTargetWithInlineData::trace(visitor); | 286 EventTargetWithInlineData::trace(visitor); |
| 285 } | 287 } |
| 286 | 288 |
| 287 } // namespace WebCore | 289 } // namespace WebCore |
| OLD | NEW |