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

Unified Diff: Source/core/fetch/MemoryCache.cpp

Issue 213193002: Make MemoryCache::contains() take a const Resource pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months 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 | « Source/core/fetch/MemoryCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/MemoryCache.cpp
diff --git a/Source/core/fetch/MemoryCache.cpp b/Source/core/fetch/MemoryCache.cpp
index 4e0d6023a6601d46e792b103183c77e4eb2362d9..7deda544049639131b00ff35e0a4a91cb35e2408 100644
--- a/Source/core/fetch/MemoryCache.cpp
+++ b/Source/core/fetch/MemoryCache.cpp
@@ -124,11 +124,11 @@ void MemoryCache::replace(Resource* newResource, Resource* oldResource)
insertInLiveDecodedResourcesList(newResource);
}
-bool MemoryCache::contains(Resource* resource)
+bool MemoryCache::contains(const Resource* resource) const
{
if (resource->url().isNull())
return false;
- MemoryCacheEntry* entry = m_resources.get(resource->url());
+ const MemoryCacheEntry* entry = m_resources.get(resource->url());
return entry && entry->m_resource == resource;
}
« no previous file with comments | « Source/core/fetch/MemoryCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698