| Index: content/browser/service_worker/service_worker_dispatcher_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| index f23aece6697dd199ee86bd81e291c93396551376..3cf6c63a029588df6045ac46ff6870c5983f6d0f 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| @@ -211,6 +211,7 @@ bool ServiceWorkerDispatcherHost::OnMessageReceived(
|
| OnWorkerStarted)
|
| IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_WorkerStopped,
|
| OnWorkerStopped)
|
| + IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_CountFeature, OnCountFeature)
|
| IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_ReportException,
|
| OnReportException)
|
| IPC_MESSAGE_HANDLER(EmbeddedWorkerHostMsg_ReportConsoleMessage,
|
| @@ -1488,6 +1489,16 @@ void ServiceWorkerDispatcherHost::OnWorkerStopped(int embedded_worker_id) {
|
| registry->OnWorkerStopped(render_process_id_, embedded_worker_id);
|
| }
|
|
|
| +void ServiceWorkerDispatcherHost::OnCountFeature(int64_t version_id,
|
| + uint32_t feature) {
|
| + if (!GetContext())
|
| + return;
|
| + ServiceWorkerVersion* version = GetContext()->GetLiveVersion(version_id);
|
| + if (!version)
|
| + return;
|
| + version->CountFeature(feature);
|
| +}
|
| +
|
| void ServiceWorkerDispatcherHost::OnReportException(
|
| int embedded_worker_id,
|
| const base::string16& error_message,
|
|
|