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

Unified Diff: third_party/WebKit/Source/core/dom/ViewportDescription.cpp

Issue 1653043002: Remove Sparse Histograms from Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms
Patch Set: Fix android code path Created 4 years, 11 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/dom/ViewportDescription.cpp
diff --git a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
index 017adb9924a1fd87379de3ed74bf792ed27c44db..c57e8f63c090d115f3f565a7e46413da0b212b15 100644
--- a/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
+++ b/third_party/WebKit/Source/core/dom/ViewportDescription.cpp
@@ -32,6 +32,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
+#include "platform/Histogram.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/Platform.h"
@@ -239,7 +240,8 @@ void ViewportDescription::reportMobilePageStats(const LocalFrame* mainFrame) con
int viewportWidth = maxWidth.intValue();
int windowWidth = mainFrame->host()->visualViewport().size().width();
int overviewZoomPercent = 100 * windowWidth / static_cast<float>(viewportWidth);
- Platform::current()->histogramSparse("Viewport.OverviewZoom", overviewZoomPercent);
+ DEFINE_STATIC_LOCAL(SparseHistogram, overviewZoomHistogram, ("Viewport.OverviewZoom"));
+ overviewZoomHistogram.sample(overviewZoomPercent);
}
} else if (maxWidth.type() == blink::DeviceWidth || maxWidth.type() == blink::ExtendToZoom) {

Powered by Google App Engine
This is Rietveld 408576698