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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 1659053002: Remove custom counts histogram from the blink API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 5d39309f4f86c0d347d0f69c12592cc623c8b452..53629fb63586de8934d62311b292b33f631adb73 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -34,6 +34,7 @@
#include "core/fetch/ResourceLoader.h"
#include "core/fetch/ResourceLoaderSet.h"
#include "core/fetch/UniqueIdentifier.h"
+#include "platform/Histogram.h"
#include "platform/Logging.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
@@ -1138,12 +1139,12 @@ ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder()
ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder()
{
- Platform::current()->histogramCustomCounts(
- "WebCore.ResourceFetcher.HitCount", m_useCount, 0, 1000, 50);
- Platform::current()->histogramCustomCounts(
- "WebCore.ResourceFetcher.RevalidateCount", m_revalidateCount, 0, 1000, 50);
- Platform::current()->histogramCustomCounts(
- "WebCore.ResourceFetcher.LoadCount", m_loadCount, 0, 1000, 50);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, hitCountHistogram, new CustomCountHistogram("WebCore.ResourceFetcher.HitCount", 0, 1000, 50));
+ hitCountHistogram.count(m_useCount);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, revalidateCountHistogram, new CustomCountHistogram("WebCore.ResourceFetcher.RevalidateCount", 0, 1000, 50));
+ revalidateCountHistogram.count(m_revalidateCount);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, loadCountHistogram, new CustomCountHistogram("WebCore.ResourceFetcher.LoadCount", 0, 1000, 50));
+ loadCountHistogram.count(m_loadCount);
}
void ResourceFetcher::DeadResourceStatsRecorder::update(RevalidationPolicy policy)

Powered by Google App Engine
This is Rietveld 408576698