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

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: 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/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 fc1f832468894e254f7fe3bbba194d8c97b99bce..6b7e4554587ebde250dfac983c246f13c7f0d7c8 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_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, cacheHitHistogram, new EnumerationHistogram("WebFont.CacheHit", CacheHitEnumMax));
+ cacheHitHistogram.count(histogramValue);
enum { CORSFail, CORSSuccess, CORSEnumMax };
int corsValue = font->isCORSFailed() ? CORSFail : CORSSuccess;
- Platform::current()->histogramEnumeration("WebFont.CORSSuccess", corsValue, CORSEnumMax);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, corsHistogram, new EnumerationHistogram("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_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, interventionHistogram, new EnumerationHistogram("WebFont.InterventionResult", boundary));
+ interventionHistogram.count(interventionResult);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698