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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/Cache.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/modules/cachestorage/Cache.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
index 44789bcd933330de53842b1ab9d49cb29b198a2f..27591b7667f5b1aa00841cccfdd4026fc69dabb7 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.cpp
@@ -21,7 +21,7 @@
#include "modules/fetch/Request.h"
#include "modules/fetch/Response.h"
#include "platform/HTTPNames.h"
-#include "public/platform/Platform.h"
+#include "platform/Histogram.h"
#include "public/platform/WebPassOwnPtr.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
@@ -193,7 +193,8 @@ void RecordResponseTypeForAdd(const Member<Response>& response)
type = ResponseType::OpaqueRedirectType;
break;
}
- Platform::current()->histogramEnumeration("ServiceWorkerCache.Cache.AddResponseType", static_cast<int>(type), static_cast<int>(ResponseType::EnumMax));
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, responseTypeHistogram, new EnumerationHistogram("ServiceWorkerCache.Cache.AddResponseType", static_cast<int>(ResponseType::EnumMax)));
+ responseTypeHistogram.count(static_cast<int>(type));
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698