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

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

Issue 516823003: ServiceWorker: Change the return value of ServiceWorkerRegistration::unregister to boolean (2/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate the reviews Created 6 years, 4 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.h
diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h
index 9997afd0cd1005001ec0e5d9973dcda48bb31206..f91a66a2ecd4d4dd6dc4ffb8cb8ebd7f35a111ad 100644
--- a/content/child/service_worker/service_worker_dispatcher.h
+++ b/content/child/service_worker/service_worker_dispatcher.h
@@ -44,6 +44,9 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
public:
typedef blink::WebServiceWorkerProvider::WebServiceWorkerRegistrationCallbacks
WebServiceWorkerRegistrationCallbacks;
+ typedef
+ blink::WebServiceWorkerProvider::WebServiceWorkerUnregistrationCallbacks
+ WebServiceWorkerUnregistrationCallbacks;
explicit ServiceWorkerDispatcher(ThreadSafeSender* thread_safe_sender);
virtual ~ServiceWorkerDispatcher();
@@ -61,7 +64,7 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
void UnregisterServiceWorker(
int provider_id,
const GURL& pattern,
- WebServiceWorkerRegistrationCallbacks* callbacks);
+ WebServiceWorkerUnregistrationCallbacks* callbacks);
// Called when a new provider context for a document is created. Usually
// this happens when a new document is being loaded, and is called much
@@ -113,7 +116,9 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
private:
typedef IDMap<WebServiceWorkerRegistrationCallbacks,
- IDMapOwnPointer> CallbackMap;
+ IDMapOwnPointer> RegistrationCallbackMap;
+ typedef IDMap<WebServiceWorkerUnregistrationCallbacks,
+ IDMapOwnPointer> UnregistrationCallbackMap;
typedef std::map<int, blink::WebServiceWorkerProviderClient*> ScriptClientMap;
typedef std::map<int, ServiceWorkerProviderContext*> ProviderContextMap;
typedef std::map<int, WebServiceWorkerImpl*> WorkerObjectMap;
@@ -177,7 +182,8 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
void RemoveServiceWorkerRegistration(
int registration_handle_id);
- CallbackMap pending_callbacks_;
+ RegistrationCallbackMap pending_registration_callbacks_;
+ UnregistrationCallbackMap pending_unregistration_callbacks_;
ScriptClientMap script_clients_;
ProviderContextMap provider_contexts_;
WorkerObjectMap service_workers_;

Powered by Google App Engine
This is Rietveld 408576698