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