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

Unified Diff: third_party/WebKit/Source/core/css/RemoteFontFaceSource.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/css/RemoteFontFaceSource.cpp
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
index 6665427093f2c093994836140e781c7989e0b2a6..160e397c5d064a71b2bb3b11343d38b9cee6fb10 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -13,7 +13,6 @@
#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontDescription.h"
#include "platform/fonts/SimpleFontData.h"
-#include "public/platform/Platform.h"
#include "wtf/CurrentTime.h"
namespace blink {
@@ -236,11 +235,13 @@ void RemoteFontFaceSource::FontLoadHistograms::recordRemoteFont(const FontResour
int histogramValue = font->url().protocolIsData() ? DataUrl
: font->response().wasCached() ? Hit
: Miss;
- Platform::current()->histogramEnumeration("WebFont.CacheHit", histogramValue, CacheHitEnumMax);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, cacheHitHistogram, ("WebFont.CacheHit", CacheHitEnumMax));
+ cacheHitHistogram.count(histogramValue);
enum { CORSFail, CORSSuccess, CORSEnumMax };
int corsValue = font->isCORSFailed() ? CORSFail : CORSSuccess;
- Platform::current()->histogramEnumeration("WebFont.CORSSuccess", corsValue, CORSEnumMax);
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, corsHistogram, ("WebFont.CORSSuccess", CORSEnumMax));
+ corsHistogram.count(corsValue);
}
}
@@ -288,7 +289,9 @@ void RemoteFontFaceSource::FontLoadHistograms::recordInterventionResult(bool tri
if (triggered)
interventionResult |= 1 << 1;
const int boundary = 1 << 2;
- Platform::current()->histogramEnumeration("WebFont.InterventionResult", interventionResult, boundary);
+
+ DEFINE_STATIC_LOCAL(EnumerationHistogram, interventionHistogram, ("WebFont.InterventionResult", boundary));
+ interventionHistogram.count(interventionResult);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698