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

Unified Diff: third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Rebase two new histograms were added today Created 4 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: third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp b/third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp
index be56acb2466a9b964fce92088730d8b817219fc6..6003675578bbe4c250c47cea6231ecf6c931949b 100644
--- a/third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp
+++ b/third_party/WebKit/Source/platform/graphics/BitmapImageMetrics.cpp
@@ -4,7 +4,8 @@
#include "platform/graphics/BitmapImageMetrics.h"
-#include "public/platform/Platform.h"
+#include "platform/Histogram.h"
+#include "wtf/Threading.h"
#include "wtf/text/WTFString.h"
namespace blink {
@@ -30,12 +31,14 @@ void BitmapImageMetrics::countDecodedImageType(const String& type)
type == "ico" ? ImageICO :
type == "bmp" ? ImageBMP : DecodedImageType::ImageUnknown;
- Platform::current()->histogramEnumeration("Blink.DecodedImageType", decodedImageType, DecodedImageTypeEnumEnd);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, decodedImageTypeHistogram, new EnumerationHistogram("Blink.DecodedImageType", DecodedImageTypeEnumEnd));
+ decodedImageTypeHistogram.count(decodedImageType);
}
void BitmapImageMetrics::countImageOrientation(const ImageOrientationEnum orientation)
{
- Platform::current()->histogramEnumeration("Blink.DecodedImage.Orientation", orientation, ImageOrientationEnumEnd);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, orientationHistogram, new EnumerationHistogram("Blink.DecodedImage.Orientation", ImageOrientationEnumEnd));
+ orientationHistogram.count(orientation);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698