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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp

Issue 2825893003: Remove ResourceFetcher::DeadResourceStatsRecorder (Closed)
Patch Set: Created 3 years, 8 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/platform/loader/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index 1816f8d687c68baf6db35b3566b50c292c224325..eab6b5bb75c619de922142e470a79ab684b462b4 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -622,9 +622,6 @@ Resource* ResourceFetcher::RequestResource(
// TODO(yoav): turn to a DCHECK. See https://crbug.com/690632
CHECK_EQ(resource->GetType(), factory.GetType());
- if (!resource->IsAlive())
- dead_stats_recorder_.Update(policy);
-
if (policy != kUse)
resource->SetIdentifier(identifier);
@@ -1536,43 +1533,6 @@ void ResourceFetcher::EmulateLoadStartedForInspector(
RequestLoadStarted(resource->Identifier(), resource, params, kUse);
}
-ResourceFetcher::DeadResourceStatsRecorder::DeadResourceStatsRecorder()
- : use_count_(0), revalidate_count_(0), load_count_(0) {}
-
-ResourceFetcher::DeadResourceStatsRecorder::~DeadResourceStatsRecorder() {
- DEFINE_THREAD_SAFE_STATIC_LOCAL(
- CustomCountHistogram, hit_count_histogram,
- new CustomCountHistogram("WebCore.ResourceFetcher.HitCount", 0, 1000,
- 50));
- hit_count_histogram.Count(use_count_);
- DEFINE_THREAD_SAFE_STATIC_LOCAL(
- CustomCountHistogram, revalidate_count_histogram,
- new CustomCountHistogram("WebCore.ResourceFetcher.RevalidateCount", 0,
- 1000, 50));
- revalidate_count_histogram.Count(revalidate_count_);
- DEFINE_THREAD_SAFE_STATIC_LOCAL(
- CustomCountHistogram, load_count_histogram,
- new CustomCountHistogram("WebCore.ResourceFetcher.LoadCount", 0, 1000,
- 50));
- load_count_histogram.Count(load_count_);
-}
-
-void ResourceFetcher::DeadResourceStatsRecorder::Update(
- RevalidationPolicy policy) {
- switch (policy) {
- case kReload:
- case kLoad:
- ++load_count_;
- return;
- case kRevalidate:
- ++revalidate_count_;
- return;
- case kUse:
- ++use_count_;
- return;
- }
-}
-
DEFINE_TRACE(ResourceFetcher) {
visitor->Trace(context_);
visitor->Trace(archive_);
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698