| 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
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 | 563 |
| 564 Resource* ResourceFetcher::createResourceForLoading(FetchRequest& request, const
String& charset, const ResourceFactory& factory) | 564 Resource* ResourceFetcher::createResourceForLoading(FetchRequest& request, const
String& charset, const ResourceFactory& factory) |
| 565 { | 565 { |
| 566 const String cacheIdentifier = getCacheIdentifier(); | 566 const String cacheIdentifier = getCacheIdentifier(); |
| 567 ASSERT(!memoryCache()->resourceForURL(request.resourceRequest().url(), cache
Identifier)); | 567 ASSERT(!memoryCache()->resourceForURL(request.resourceRequest().url(), cache
Identifier)); |
| 568 | 568 |
| 569 WTF_LOG(ResourceLoading, "Loading Resource for '%s'.", request.resourceReque
st().url().elidedString().latin1().data()); | 569 WTF_LOG(ResourceLoading, "Loading Resource for '%s'.", request.resourceReque
st().url().elidedString().latin1().data()); |
| 570 | 570 |
| 571 Resource* resource = factory.create(request.resourceRequest(), request.optio
ns(), charset); | 571 Resource* resource = factory.create(request.resourceRequest(), request.optio
ns(), charset); |
| 572 resource->setLinkPreload(request.isLinkPreload()); | 572 resource->setLinkPreload(request.isLinkPreload()); |
| 573 if (request.forPreload()) { |
| 574 resource->setPreloadDiscoveryTime(request.preloadDiscoveryTime()); |
| 575 } |
| 573 resource->setCacheIdentifier(cacheIdentifier); | 576 resource->setCacheIdentifier(cacheIdentifier); |
| 574 | 577 |
| 575 // Don't add main resource to cache to prevent reuse. | 578 // Don't add main resource to cache to prevent reuse. |
| 576 if (factory.type() != Resource::MainResource) | 579 if (factory.type() != Resource::MainResource) |
| 577 memoryCache()->add(resource); | 580 memoryCache()->add(resource); |
| 578 return resource; | 581 return resource; |
| 579 } | 582 } |
| 580 | 583 |
| 581 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) | 584 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) |
| 582 { | 585 { |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 visitor->trace(m_context); | 1219 visitor->trace(m_context); |
| 1217 visitor->trace(m_archive); | 1220 visitor->trace(m_archive); |
| 1218 visitor->trace(m_loaders); | 1221 visitor->trace(m_loaders); |
| 1219 visitor->trace(m_nonBlockingLoaders); | 1222 visitor->trace(m_nonBlockingLoaders); |
| 1220 visitor->trace(m_documentResources); | 1223 visitor->trace(m_documentResources); |
| 1221 visitor->trace(m_preloads); | 1224 visitor->trace(m_preloads); |
| 1222 visitor->trace(m_resourceTimingInfoMap); | 1225 visitor->trace(m_resourceTimingInfoMap); |
| 1223 } | 1226 } |
| 1224 | 1227 |
| 1225 } // namespace blink | 1228 } // namespace blink |
| OLD | NEW |