| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 void ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource) | 1214 void ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource) |
| 1215 { | 1215 { |
| 1216 if (!frame() || !frame()->page() || resource->status() != Resource::Cached |
| m_validatedURLs.contains(resource->url())) | 1216 if (!frame() || !frame()->page() || resource->status() != Resource::Cached |
| m_validatedURLs.contains(resource->url())) |
| 1217 return; | 1217 return; |
| 1218 | 1218 |
| 1219 ResourceRequest request(resource->url()); | 1219 ResourceRequest request(resource->url()); |
| 1220 unsigned long identifier = createUniqueIdentifier(); | 1220 unsigned long identifier = createUniqueIdentifier(); |
| 1221 context().dispatchDidLoadResourceFromMemoryCache(request, resource->response
()); | 1221 context().dispatchDidLoadResourceFromMemoryCache(request, resource->response
()); |
| 1222 // FIXME: If willSendRequest changes the request, we don't respect it. | 1222 // FIXME: If willSendRequest changes the request, we don't respect it. |
| 1223 willSendRequest(identifier, request, ResourceResponse(), resource->options()
.initiatorInfo); | 1223 willSendRequest(identifier, request, ResourceResponse(), resource->options()
.initiatorInfo); |
| 1224 InspectorInstrumentation::markResourceAsCached(frame()->page(), identifier); | 1224 InspectorInstrumentation::markResourceAsCached(frame(), identifier); |
| 1225 context().sendRemainingDelegateMessages(m_documentLoader, identifier, resour
ce->response(), resource->encodedSize()); | 1225 context().sendRemainingDelegateMessages(m_documentLoader, identifier, resour
ce->response(), resource->encodedSize()); |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 int ResourceFetcher::requestCount() const | 1228 int ResourceFetcher::requestCount() const |
| 1229 { | 1229 { |
| 1230 return m_loaders ? m_loaders->size() : 0; | 1230 return m_loaders ? m_loaders->size() : 0; |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const
String& charset) | 1233 void ResourceFetcher::preload(Resource::Type type, FetchRequest& request, const
String& charset) |
| 1234 { | 1234 { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 | 1579 |
| 1580 void ResourceFetcher::trace(Visitor* visitor) | 1580 void ResourceFetcher::trace(Visitor* visitor) |
| 1581 { | 1581 { |
| 1582 visitor->trace(m_document); | 1582 visitor->trace(m_document); |
| 1583 visitor->trace(m_loaders); | 1583 visitor->trace(m_loaders); |
| 1584 visitor->trace(m_nonBlockingLoaders); | 1584 visitor->trace(m_nonBlockingLoaders); |
| 1585 ResourceLoaderHost::trace(visitor); | 1585 ResourceLoaderHost::trace(visitor); |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 } | 1588 } |
| OLD | NEW |