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

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: Apply 3-sided patch format 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
« no previous file with comments | « no previous file | content/child/service_worker/service_worker_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..47e1882fdcd7f779ac4ce791a73d3ab621589904 100644
--- a/content/child/service_worker/service_worker_dispatcher.h
+++ b/content/child/service_worker/service_worker_dispatcher.h
@@ -44,6 +44,14 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
public:
typedef blink::WebServiceWorkerProvider::WebServiceWorkerRegistrationCallbacks
WebServiceWorkerRegistrationCallbacks;
+#ifdef SERVICEWORKER_UNREGISTER_DISABLE_NEW_FEATURE
+ typedef WebServiceWorkerRegistrationCallbacks
+ WebServiceWorkerUnRegistrationCallbacks;
+#else
+ typedef
+ blink::WebServiceWorkerProvider::WebServiceWorkerUnRegistrationCallbacks
+ WebServiceWorkerUnRegistrationCallbacks;
+#endif
nhiroki 2014/08/29 03:20:07 Probably you only need to add line 51-53 because y
explicit ServiceWorkerDispatcher(ThreadSafeSender* thread_safe_sender);
virtual ~ServiceWorkerDispatcher();
@@ -61,7 +69,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 +121,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 +187,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_;
« no previous file with comments | « no previous file | content/child/service_worker/service_worker_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698