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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 DCHECK(!memoryCache()->resourceForURL(request.resourceRequest().url(), | 713 DCHECK(!memoryCache()->resourceForURL(request.resourceRequest().url(), |
714 cacheIdentifier)); | 714 cacheIdentifier)); |
715 | 715 |
716 RESOURCE_LOADING_DVLOG(1) << "Loading Resource for " | 716 RESOURCE_LOADING_DVLOG(1) << "Loading Resource for " |
717 << request.resourceRequest().url().elidedString(); | 717 << request.resourceRequest().url().elidedString(); |
718 | 718 |
719 Resource* resource = | 719 Resource* resource = |
720 factory.create(request.resourceRequest(), request.options(), charset); | 720 factory.create(request.resourceRequest(), request.options(), charset); |
721 resource->setLinkPreload(request.isLinkPreload()); | 721 resource->setLinkPreload(request.isLinkPreload()); |
722 if (request.isSpeculativePreload()) { | 722 if (request.isSpeculativePreload()) { |
723 resource->setPreloadDiscoveryTime(request.preloadDiscoveryTime()); | 723 resource->setPreloadDiscoveryTime( |
| 724 request.resourceRequest().preloadDiscoveryTime()); |
724 } | 725 } |
725 resource->setCacheIdentifier(cacheIdentifier); | 726 resource->setCacheIdentifier(cacheIdentifier); |
726 | 727 |
727 // - Don't add main resource to cache to prevent reuse. | 728 // - Don't add main resource to cache to prevent reuse. |
728 // - Don't add the resource if its body will not be stored. | 729 // - Don't add the resource if its body will not be stored. |
729 if (factory.type() != Resource::MainResource && | 730 if (factory.type() != Resource::MainResource && |
730 request.options().dataBufferingPolicy != DoNotBufferData) { | 731 request.options().dataBufferingPolicy != DoNotBufferData) { |
731 memoryCache()->add(resource); | 732 memoryCache()->add(resource); |
732 } | 733 } |
733 return resource; | 734 return resource; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 visitor->trace(m_context); | 1547 visitor->trace(m_context); |
1547 visitor->trace(m_archive); | 1548 visitor->trace(m_archive); |
1548 visitor->trace(m_loaders); | 1549 visitor->trace(m_loaders); |
1549 visitor->trace(m_nonBlockingLoaders); | 1550 visitor->trace(m_nonBlockingLoaders); |
1550 visitor->trace(m_documentResources); | 1551 visitor->trace(m_documentResources); |
1551 visitor->trace(m_preloads); | 1552 visitor->trace(m_preloads); |
1552 visitor->trace(m_resourceTimingInfoMap); | 1553 visitor->trace(m_resourceTimingInfoMap); |
1553 } | 1554 } |
1554 | 1555 |
1555 } // namespace blink | 1556 } // namespace blink |
OLD | NEW |