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

Unified Diff: Source/platform/graphics/BitmapImage.h

Issue 1242263011: Record UMA stats for Blink decoded image types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved logic to BitmapImage to avoid double counting for ICO/CUR Created 5 years, 5 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 | « no previous file | Source/platform/graphics/BitmapImage.cpp » ('j') | Source/platform/graphics/BitmapImage.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/BitmapImage.h
diff --git a/Source/platform/graphics/BitmapImage.h b/Source/platform/graphics/BitmapImage.h
index 6d49ff74f2bb1670bab47930ca08a0bb50066e70..59a47baa83ddce259dce36c57e988bd508eb5e9b 100644
--- a/Source/platform/graphics/BitmapImage.h
+++ b/Source/platform/graphics/BitmapImage.h
@@ -41,6 +41,23 @@
namespace blink {
+enum DecodedImageType {
+ // These values are histogrammed over time; do not change their ordinal
Noel Gordon 2015/08/01 02:33:06 We should move this into its own file, similar to
urvang 2015/08/04 20:21:17 Can you explain why this is necessary? - Other enu
+ // values. When deleting an image type, replace it with a dummy value;
+ // when adding an image type, do so at the bottom (and update DecodedImageTypeMax).
+ // Also, this enum should be in sync with the 'DecodedImageType' enum in
+ // tools/metrics/histograms/histograms.xml
Noel Gordon 2015/08/01 02:33:06 tools/metrics/histograms/histograms.xml -> src/too
urvang 2015/08/04 20:21:16 In code search, "tools/metrics/histograms/histogra
+ ImageUnknown = 0,
+ ImageJPEG,
+ ImagePNG,
+ ImageGIF,
+ ImageWebP,
+ ImageICO,
+ ImageBMP,
+
+ DecodedImageTypeMax = ImageBMP // Must equal the last "real" image type above.
Noel Gordon 2015/08/01 02:33:06 nit: abbv DecodedImageTypeMax. Rename it to LastD
urvang 2015/08/04 20:21:16 Done.
+};
+
template <typename T> class Timer;
class PLATFORM_EXPORT BitmapImage final : public Image {
« no previous file with comments | « no previous file | Source/platform/graphics/BitmapImage.cpp » ('j') | Source/platform/graphics/BitmapImage.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698