| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 | 564 |
| 565 Resource* ResourceFetcher::createResourceForLoading(FetchRequest& request, const
String& charset, const ResourceFactory& factory) | 565 Resource* ResourceFetcher::createResourceForLoading(FetchRequest& request, const
String& charset, const ResourceFactory& factory) |
| 566 { | 566 { |
| 567 const String cacheIdentifier = getCacheIdentifier(); | 567 const String cacheIdentifier = getCacheIdentifier(); |
| 568 ASSERT(!memoryCache()->resourceForURL(request.resourceRequest().url(), cache
Identifier)); | 568 ASSERT(!memoryCache()->resourceForURL(request.resourceRequest().url(), cache
Identifier)); |
| 569 | 569 |
| 570 WTF_LOG(ResourceLoading, "Loading Resource for '%s'.", request.resourceReque
st().url().elidedString().latin1().data()); | 570 WTF_LOG(ResourceLoading, "Loading Resource for '%s'.", request.resourceReque
st().url().elidedString().latin1().data()); |
| 571 | 571 |
| 572 Resource* resource = factory.create(request.resourceRequest(), request.optio
ns(), charset); | 572 Resource* resource = factory.create(request.resourceRequest(), request.optio
ns(), charset); |
| 573 resource->setLinkPreload(request.isLinkPreload()); | 573 resource->setLinkPreload(request.isLinkPreload()); |
| 574 if (request.forPreload()) { |
| 575 resource->setPreloadDiscoveryTime(request.preloadDiscoveryTime()); |
| 576 } |
| 574 resource->setCacheIdentifier(cacheIdentifier); | 577 resource->setCacheIdentifier(cacheIdentifier); |
| 575 | 578 |
| 576 // Don't add main resource to cache to prevent reuse. | 579 // Don't add main resource to cache to prevent reuse. |
| 577 if (factory.type() != Resource::MainResource) | 580 if (factory.type() != Resource::MainResource) |
| 578 memoryCache()->add(resource); | 581 memoryCache()->add(resource); |
| 579 return resource; | 582 return resource; |
| 580 } | 583 } |
| 581 | 584 |
| 582 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) | 585 void ResourceFetcher::storeResourceTimingInitiatorInformation(Resource* resource
) |
| 583 { | 586 { |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 visitor->trace(m_context); | 1167 visitor->trace(m_context); |
| 1165 visitor->trace(m_archive); | 1168 visitor->trace(m_archive); |
| 1166 visitor->trace(m_loaders); | 1169 visitor->trace(m_loaders); |
| 1167 visitor->trace(m_nonBlockingLoaders); | 1170 visitor->trace(m_nonBlockingLoaders); |
| 1168 visitor->trace(m_documentResources); | 1171 visitor->trace(m_documentResources); |
| 1169 visitor->trace(m_preloads); | 1172 visitor->trace(m_preloads); |
| 1170 visitor->trace(m_resourceTimingInfoMap); | 1173 visitor->trace(m_resourceTimingInfoMap); |
| 1171 } | 1174 } |
| 1172 | 1175 |
| 1173 } // namespace blink | 1176 } // namespace blink |
| OLD | NEW |