Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2138)

Unified Diff: sky/engine/core/fetch/Resource.cpp

Issue 710383002: Remove preload support from the MemoryCache (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/fetch/Resource.h ('k') | sky/engine/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « sky/engine/core/fetch/Resource.h ('k') | sky/engine/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698