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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.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: Apply similar changes from custom count histograms change to this change 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/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index f0c2f5bb0e85aca9b5f2d33dc1db886b48a4252b..c10da492c84e4e70cee5d370d6e68027447876f7 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -46,6 +46,7 @@
#include "core/imagebitmap/ImageBitmapOptions.h"
#include "core/layout/LayoutHTMLCanvas.h"
#include "core/paint/PaintLayer.h"
+#include "platform/Histogram.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/Canvas2DImageBufferSurface.h"
@@ -237,8 +238,10 @@ CanvasRenderingContext* HTMLCanvasElement::getCanvasRenderingContext(const Strin
return nullptr;
// Log the aliased context type used.
- if (!m_context)
- Platform::current()->histogramEnumeration("Canvas.ContextType", contextType, CanvasRenderingContext::ContextTypeCount);
+ if (!m_context) {
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, contextTypeHistogram, ("Canvas.ContextType", CanvasRenderingContext::ContextTypeCount));
+ contextTypeHistogram.count(contextType);
+ }
contextType = CanvasRenderingContext::resolveContextTypeAliases(contextType);

Powered by Google App Engine
This is Rietveld 408576698