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

Unified Diff: third_party/WebKit/Source/platform/graphics/CanvasMetrics.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/CanvasMetrics.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/CanvasMetrics.cpp b/third_party/WebKit/Source/platform/graphics/CanvasMetrics.cpp
index 69fad9e7fdab7be55523d3468c5202d6eaf0d2e5..4783924b5171bcac4146a4b34b5c0792916432b9 100644
--- a/third_party/WebKit/Source/platform/graphics/CanvasMetrics.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CanvasMetrics.cpp
@@ -4,13 +4,15 @@
#include "platform/graphics/CanvasMetrics.h"
-#include "public/platform/Platform.h"
+#include "platform/Histogram.h"
+#include "wtf/Threading.h"
namespace blink {
void CanvasMetrics::countCanvasContextUsage(const CanvasContextUsage canvasContextUsage)
{
- Platform::current()->histogramEnumeration("WebCore.CanvasContextUsage", canvasContextUsage, CanvasContextUsage::NumberOfUsages);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, usageHistogram, new EnumerationHistogram("WebCore.CanvasContextUsage", CanvasContextUsage::NumberOfUsages));
+ usageHistogram.count(canvasContextUsage);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698