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

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: int32_t -> uint32_t Created 3 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/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index e22ac3b405e330206b0533c0d1184ea982b97bb7..3c2ac91d1143ccd87a792375c917f4a1e048b25e 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -356,16 +356,16 @@ bool ServiceWorkerGlobalScopeProxy::hasFetchEventHandler() {
return m_workerGlobalScope->hasEventListeners(EventTypeNames::fetch);
}
-void ServiceWorkerGlobalScopeProxy::countFeature(UseCounter::Feature) {
- // TODO(nhiroki): Support UseCounter for ServiceWorker. Send an IPC message to
- // the browser process and ask each controlled document to record API use in
- // its UseCoutner (https://crbug.com/376039).
+void ServiceWorkerGlobalScopeProxy::countFeature(UseCounter::Feature feature) {
+ client().countFeature(static_cast<uint32_t>(feature));
}
-void ServiceWorkerGlobalScopeProxy::countDeprecation(UseCounter::Feature) {
- // TODO(nhiroki): Support UseCounter for ServiceWorker. Send an IPC message to
- // the browser process and ask each controlled document to record API use in
- // its UseCoutner (https://crbug.com/376039).
+void ServiceWorkerGlobalScopeProxy::countDeprecation(
+ UseCounter::Feature feature) {
+ // Go through the same code path with countFeature() because a deprecation
+ // message is already shown on the worker console and a remaining work is just
+ // to record an API use.
+ countFeature(feature);
}
void ServiceWorkerGlobalScopeProxy::reportException(

Powered by Google App Engine
This is Rietveld 408576698