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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.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: Fix misplaced bracket on android 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/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index f28b4621f5b1090a71513ffa96a6c843aa2b0cf3..914905b00ef1b49697740998e8d9412472c13ac7 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -4055,10 +4055,13 @@ void WebViewImpl::didFinishMainFrameDocumentLoad()
const Document& document = *mainFrameImpl()->frame()->document();
// "AutodetectEncoding.Attempted" is of boolean type - either 0 or 1. Use 2 for the boundary value.
- Platform::current()->histogramEnumeration("AutodetectEncoding.Attempted", document.attemptedToDetermineEncodingFromContentSniffing(), 2);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, autoDetectAttemptedHistogram, ("AutodetectEncoding.Attempted", 2));
+ autoDetectAttemptedHistogram.count(document.attemptedToDetermineEncodingFromContentSniffing());
if (document.encodingWasDetectedFromContentSniffing()) {
int encodingId = encodingToUmaId(document.encoding());
- Platform::current()->histogramEnumeration("AutodetectEncoding.Detected", encodingId, WTF_ARRAY_LENGTH(kEncodingNames) + 1);
+
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, autoDetectDetectedHistogram, ("AutodetectEncoding.Detected", WTF_ARRAY_LENGTH(kEncodingNames) + 1));
+ autoDetectDetectedHistogram.count(encodingId);
}
}
#endif

Powered by Google App Engine
This is Rietveld 408576698