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

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: Rebase Created 6 years, 3 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 3f136c28730f3f42b7056c24f46d830243b681cb..6ff4fa5bf0d6c61ad63fc5c68d64fd5803dfeba2 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;
@@ -137,6 +142,10 @@ class ServiceWorkerDispatcher : public WorkerTaskRunner::Observer {
int request_id,
blink::WebServiceWorkerError::ErrorType error_type,
const base::string16& message);
+ void OnUnregistrationError(int thread_id,
+ int request_id,
+ blink::WebServiceWorkerError::ErrorType error_type,
+ const base::string16& message);
void OnServiceWorkerStateChanged(int thread_id,
int handle_id,
blink::WebServiceWorkerState state);
@@ -180,7 +189,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