Chromium Code Reviews| Index: sky/engine/core/fetch/Resource.cpp |
| diff --git a/sky/engine/core/fetch/Resource.cpp b/sky/engine/core/fetch/Resource.cpp |
| index 738adb8babc2def6b4ac22ab24529af6c4603644..c632c79d6691c0f8d17a83311c75ecb200e0f0a4 100644 |
| --- a/sky/engine/core/fetch/Resource.cpp |
| +++ b/sky/engine/core/fetch/Resource.cpp |
| @@ -101,9 +101,7 @@ Resource::Resource(const ResourceRequest& request, Type type) |
| , m_encodedSize(0) |
| , m_decodedSize(0) |
| , m_handleCount(0) |
| - , m_preloadCount(0) |
| , m_protectorCount(0) |
| - , m_preloadResult(PreloadNotReferenced) |
| , m_requestedFromNetworkingLayer(false) |
| , m_loading(false) |
| , m_switchingClientsToRevalidatedResource(false) |
| @@ -240,7 +238,7 @@ void Resource::error(Resource::Status status) |
| if (m_resourceToRevalidate) |
| revalidationFailed(); |
| - if (!m_error.isNull() && (m_error.isCancellation() || !isPreloaded())) |
|
esprehn
2014/11/11 17:52:06
Why don't you need the isCancellation check now?
abarth-chromium
2014/11/11 17:54:15
!isPreloaded() is always true.
|
| + if (!m_error.isNull()) |
| memoryCache()->remove(this); |
| setStatus(status); |
| @@ -377,7 +375,7 @@ void Resource::responseReceived(const ResourceResponse& response) |
| bool Resource::canDelete() const |
| { |
| - return !hasClients() && !m_loader && !m_preloadCount && hasRightHandleCountApartFromCache(0) |
| + return !hasClients() && !m_loader && hasRightHandleCountApartFromCache(0) |
| && !m_protectorCount && !m_resourceToRevalidate && !m_proxyResource; |
| } |
| @@ -422,14 +420,6 @@ bool Resource::addClientToSet(ResourceClient* client) |
| { |
| ASSERT(!isPurgeable()); |
| - if (m_preloadResult == PreloadNotReferenced) { |
| - if (isLoaded()) |
| - m_preloadResult = PreloadReferencedWhileComplete; |
| - else if (m_requestedFromNetworkingLayer) |
| - m_preloadResult = PreloadReferencedWhileLoading; |
| - else |
| - m_preloadResult = PreloadReferenced; |
| - } |
| if (!hasClients()) |
| memoryCache()->makeLive(this); |