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 c531e915e888504b1396aa27dab35bf4db51b7a3..d6c43e4e21a7c30d2651d372e02caace6a6f1bba 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
@@ -4,6 +4,7 @@ |
#include "content/browser/service_worker/service_worker_dispatcher_host.h" |
+#include "base/logging.h" |
#include "content/browser/service_worker/service_worker_context.h" |
#include "content/common/service_worker_messages.h" |
#include "ipc/ipc_message_macros.h" |
@@ -19,7 +20,6 @@ ServiceWorkerDispatcherHost::~ServiceWorkerDispatcherHost() {} |
bool ServiceWorkerDispatcherHost::OnMessageReceived(const IPC::Message& message, |
bool* message_was_ok) { |
- |
if (IPC_MESSAGE_CLASS(message) != ServiceWorkerMsgStart) |
return false; |
@@ -36,15 +36,24 @@ bool ServiceWorkerDispatcherHost::OnMessageReceived(const IPC::Message& message, |
return handled; |
} |
-void ServiceWorkerDispatcherHost::OnRegisterServiceWorker(int32 registry_id, |
- const string16& scope, |
- const GURL& script_url) { |
+// total hack, do not check in |
+static int32 worker_id = 0; |
kinuko
2013/09/30 12:41:17
So the plan is we're replacing this with browser-s
alecflett
2013/10/01 00:17:04
Yes exactly.
I think either we need a global sing
|
+ |
+void ServiceWorkerDispatcherHost::OnRegisterServiceWorker( |
+ int32 request_id, |
+ const string16& scope, |
+ const GURL& script_url) { |
// TODO(alecflett): Enforce that script_url must have the same |
// origin as the registering document. |
+ LOG(ERROR) << "in browser: OnRegisterServiceWorker!"; |
+ Send(new ServiceWorkerMsg_ServiceWorkerRegistered(request_id, worker_id++)); |
} |
void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker( |
- int32 registry_id, |
- const string16& scope) {} |
+ int32 request_id, |
+ const string16& scope) { |
+ LOG(ERROR) << "in browser: OnUnregisterServiceWorker!"; |
+ Send(new ServiceWorkerMsg_ServiceWorkerUnregistered(request_id, worker_id++)); |
+} |
} // namespace content |