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

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: Fix a few thread_safe_static_local -> static_local as per feedback in reviews 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/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 6a2ea8b2c872d53287450c13863b2ef3eb989e97..7b5848858ecaedac0d9cc41100baead74598dd3d 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -35,6 +35,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"
@@ -1149,12 +1150,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