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

Unified Diff: content/child/service_worker/service_worker_dispatcher.cc

Issue 225403014: ServiceWorker: propagate provider_id to the browser process in .register + int32/int cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 8 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: content/child/service_worker/service_worker_dispatcher.cc
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 991efe36fe19d937ee53bda101b7b8a0a751922d..ff2cb395043869f793f629a926e93feae7f2c362 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -59,22 +59,24 @@ bool ServiceWorkerDispatcher::Send(IPC::Message* msg) {
}
void ServiceWorkerDispatcher::RegisterServiceWorker(
+ int provider_id,
const GURL& pattern,
const GURL& script_url,
WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks) {
DCHECK(callbacks);
int request_id = pending_callbacks_.Add(callbacks);
thread_safe_sender_->Send(new ServiceWorkerHostMsg_RegisterServiceWorker(
- CurrentWorkerId(), request_id, pattern, script_url));
+ CurrentWorkerId(), request_id, provider_id, pattern, script_url));
}
void ServiceWorkerDispatcher::UnregisterServiceWorker(
+ int provider_id,
const GURL& pattern,
WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks) {
DCHECK(callbacks);
int request_id = pending_callbacks_.Add(callbacks);
thread_safe_sender_->Send(new ServiceWorkerHostMsg_UnregisterServiceWorker(
- CurrentWorkerId(), request_id, pattern));
+ CurrentWorkerId(), request_id, provider_id, pattern));
}
void ServiceWorkerDispatcher::AddScriptClient(
@@ -112,8 +114,8 @@ ServiceWorkerDispatcher* ServiceWorkerDispatcher::ThreadSpecificInstance(
return dispatcher;
}
-void ServiceWorkerDispatcher::OnRegistered(int32 thread_id,
- int32 request_id,
+void ServiceWorkerDispatcher::OnRegistered(int thread_id,
+ int request_id,
int handle_id) {
WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks =
pending_callbacks_.Lookup(request_id);
@@ -134,8 +136,8 @@ void ServiceWorkerDispatcher::OnRegistered(int32 thread_id,
}
void ServiceWorkerDispatcher::OnUnregistered(
- int32 thread_id,
- int32 request_id) {
+ int thread_id,
+ int request_id) {
WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks =
pending_callbacks_.Lookup(request_id);
DCHECK(callbacks);
@@ -147,8 +149,8 @@ void ServiceWorkerDispatcher::OnUnregistered(
}
void ServiceWorkerDispatcher::OnRegistrationError(
- int32 thread_id,
- int32 request_id,
+ int thread_id,
+ int request_id,
WebServiceWorkerError::ErrorType error_type,
const base::string16& message) {
WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks =

Powered by Google App Engine
This is Rietveld 408576698