| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 case Resource::Mock: | 241 case Resource::Mock: |
| 242 return WebURLRequest::RequestContextSubresource; | 242 return WebURLRequest::RequestContextSubresource; |
| 243 } | 243 } |
| 244 NOTREACHED(); | 244 NOTREACHED(); |
| 245 return WebURLRequest::RequestContextSubresource; | 245 return WebURLRequest::RequestContextSubresource; |
| 246 } | 246 } |
| 247 | 247 |
| 248 ResourceFetcher::ResourceFetcher(FetchContext* newContext) | 248 ResourceFetcher::ResourceFetcher(FetchContext* newContext) |
| 249 : m_context(newContext), | 249 : m_context(newContext), |
| 250 m_archive(context().isMainFrame() ? nullptr : context().archive()), | 250 m_archive(context().isMainFrame() ? nullptr : context().archive()), |
| 251 // loadingTaskRunner() is null in tests that use the null fetch context. |
| 251 m_resourceTimingReportTimer( | 252 m_resourceTimingReportTimer( |
| 253 context().loadingTaskRunner() |
| 254 ? context().loadingTaskRunner() |
| 255 : Platform::current()->currentThread()->getWebTaskRunner(), |
| 252 this, | 256 this, |
| 253 &ResourceFetcher::resourceTimingReportTimerFired), | 257 &ResourceFetcher::resourceTimingReportTimerFired), |
| 254 m_autoLoadImages(true), | 258 m_autoLoadImages(true), |
| 255 m_imagesEnabled(true), | 259 m_imagesEnabled(true), |
| 256 m_allowStaleResources(false), | 260 m_allowStaleResources(false), |
| 257 m_imageFetched(false) { | 261 m_imageFetched(false) {} |
| 258 } | |
| 259 | 262 |
| 260 ResourceFetcher::~ResourceFetcher() {} | 263 ResourceFetcher::~ResourceFetcher() {} |
| 261 | 264 |
| 262 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const { | 265 Resource* ResourceFetcher::cachedResource(const KURL& resourceURL) const { |
| 263 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL); | 266 KURL url = MemoryCache::removeFragmentIdentifierIfNeeded(resourceURL); |
| 264 const WeakMember<Resource>& resource = m_documentResources.get(url); | 267 const WeakMember<Resource>& resource = m_documentResources.get(url); |
| 265 return resource.get(); | 268 return resource.get(); |
| 266 } | 269 } |
| 267 | 270 |
| 268 bool ResourceFetcher::isControlledByServiceWorker() const { | 271 bool ResourceFetcher::isControlledByServiceWorker() const { |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 visitor->trace(m_context); | 1505 visitor->trace(m_context); |
| 1503 visitor->trace(m_archive); | 1506 visitor->trace(m_archive); |
| 1504 visitor->trace(m_loaders); | 1507 visitor->trace(m_loaders); |
| 1505 visitor->trace(m_nonBlockingLoaders); | 1508 visitor->trace(m_nonBlockingLoaders); |
| 1506 visitor->trace(m_documentResources); | 1509 visitor->trace(m_documentResources); |
| 1507 visitor->trace(m_preloads); | 1510 visitor->trace(m_preloads); |
| 1508 visitor->trace(m_resourceTimingInfoMap); | 1511 visitor->trace(m_resourceTimingInfoMap); |
| 1509 } | 1512 } |
| 1510 | 1513 |
| 1511 } // namespace blink | 1514 } // namespace blink |
| OLD | NEW |