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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.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/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index a7494c8a0a77ceb71a90f493bb0923a49635f425..4f8a31d369deb4a418d85e9ba9f93995e69a8c0c 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -42,6 +42,7 @@
#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
+#include "platform/Histogram.h"
#include "platform/TraceEvent.h"
#include "platform/geometry/DoubleRect.h"
#include "platform/geometry/FloatSize.h"
@@ -49,7 +50,6 @@
#include "platform/graphics/GraphicsLayerFactory.h"
#include "platform/scroll/Scrollbar.h"
#include "platform/scroll/ScrollbarThemeOverlay.h"
-#include "public/platform/Platform.h"
#include "public/platform/WebCompositorSupport.h"
#include "public/platform/WebLayer.h"
#include "public/platform/WebLayerTreeView.h"
@@ -686,7 +686,8 @@ void VisualViewport::sendUMAMetrics()
if (m_trackPinchZoomStatsForPage) {
bool didScale = m_maxPageScale > 0;
- Platform::current()->histogramEnumeration("Viewport.DidScalePage", didScale ? 1 : 0, 2);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, didScaleHistogram, ("Viewport.DidScalePage", 2));
+ didScaleHistogram.count(didScale ? 1 : 0);
if (didScale) {
int zoomPercentage = floor(m_maxPageScale * 100);
@@ -694,7 +695,8 @@ void VisualViewport::sendUMAMetrics()
// See the PageScaleFactor enumeration in histograms.xml for the bucket ranges.
int bucket = floor(zoomPercentage / 25.f);
- Platform::current()->histogramEnumeration("Viewport.MaxPageScale", bucket, 21);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, maxScaleHistogram, ("Viewport.MaxPageScale", 21));
+ maxScaleHistogram.count(bucket);
}
}

Powered by Google App Engine
This is Rietveld 408576698