Chromium Code Reviews| 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. |
|
haraken
2017/02/08 04:28:45
Nit: I'd prefer preparing separate methods for cou
nhiroki
2017/02/09 05:11:32
Removed the switch instead of adding a separate pa
|
| + countFeature(feature); |
| } |
| void ServiceWorkerGlobalScopeProxy::reportException( |