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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 12224017: Create a new disk_cache type, SHADER_CACHE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
Index: net/disk_cache/backend_impl.cc
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index e7fad5b9ffe8def36969239edca1ebe9a49d5541..dc66f5fa8a4b81860c6cd2d000709a4c02c77958 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -919,9 +919,9 @@ LruData* BackendImpl::GetLruData() {
}
void BackendImpl::UpdateRank(EntryImpl* entry, bool modified) {
- if (!read_only_) {
- eviction_.UpdateRank(entry, modified);
- }
+ if (read_only_ || (!modified && cache_type() == net::SHADER_CACHE))
+ return;
+ eviction_.UpdateRank(entry, modified);
}
void BackendImpl::RecoveredEntry(CacheRankingsBlock* rankings) {

Powered by Google App Engine
This is Rietveld 408576698