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

Unified Diff: third_party/WebKit/Source/core/fetch/ImageResource.h

Issue 2499263002: Add UMA to estimate deroppable memory usage of encoded data size in Resources (Closed)
Patch Set: Use platform/Histgram.h instead of adding depencency from core to base Created 4 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 | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ImageResource.h
diff --git a/third_party/WebKit/Source/core/fetch/ImageResource.h b/third_party/WebKit/Source/core/fetch/ImageResource.h
index 3a7c81076e9667e8cca6b2d7a17227acad038e0f..64f6acfd34405ffee16048ddbfa3eb868343be4d 100644
--- a/third_party/WebKit/Source/core/fetch/ImageResource.h
+++ b/third_party/WebKit/Source/core/fetch/ImageResource.h
@@ -160,6 +160,10 @@ class CORE_EXPORT ImageResource final
return m_isPlaceholder && willPaintBrokenImage();
}
+ void setNotRefetchableDataFromDiskCache() {
+ m_isRefetchableDataFromDiskCache = false;
+ }
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -224,6 +228,10 @@ class CORE_EXPORT ImageResource final
Timer<ImageResource> m_flushTimer;
double m_lastFlushTime = 0.;
Image::SizeAvailability m_sizeAvailable = Image::SizeUnavailable;
+
+ // Indicates if this resource's encoded image data can be purged and refetched
+ // from disk cache to save memory usage. See crbug/664437.
+ bool m_isRefetchableDataFromDiskCache;
};
DEFINE_RESOURCE_TYPE_CASTS(Image);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ImageResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698