Chromium Code Reviews| 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 5c4c7ad5308ee21cb9cae6951f686eaeb7ab67b9..ff23ad673b47d8865e495d1e8d13f1d51c296953 100644 |
| --- a/content/child/service_worker/service_worker_dispatcher.h |
| +++ b/content/child/service_worker/service_worker_dispatcher.h |
| @@ -134,12 +134,12 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
| const ServiceWorkerObjectInfo& info, |
| bool adopt_handle); |
| - // Creates a WebServiceWorkerRegistrationImpl for the specified registration |
| - // and transfers its ownership to the caller. If |adopt_handle| is true, a |
| - // ServiceWorkerRegistrationHandleReference will be adopted for the |
| - // registration. |
| - WebServiceWorkerRegistrationImpl* CreateServiceWorkerRegistration( |
| + // Returns a new registration filled in with version attributes. If |
| + // |adopt_handle| is true, this assumes given |info| and |attrs| retain handle |
| + // references and adopts them. |
| + scoped_ptr<WebServiceWorkerRegistrationImpl> CreateRegistration( |
|
falken
2015/08/25 03:26:45
Have you considered splitting this into CreateRegi
nhiroki
2015/08/25 05:40:53
Good. Done. I'll do the same cleanup for GetServic
|
| const ServiceWorkerRegistrationObjectInfo& info, |
| + const ServiceWorkerVersionAttributes& attrs, |
| bool adopt_handle); |
| static ServiceWorkerDispatcher* GetOrCreateThreadSpecificInstance( |
| @@ -265,15 +265,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcher |
| void RemoveServiceWorkerRegistration( |
| int registration_handle_id); |
| - // Returns an existing registration or new one filled in with version |
| - // attributes. This function assumes given |info| and |attrs| retain handle |
| - // references and always adopts them. |
| - // TODO(nhiroki): This assumption seems to impair readability. We could |
| - // explictly pass ServiceWorker(Registration)HandleReference instead. |
| - WebServiceWorkerRegistrationImpl* FindOrCreateRegistration( |
| - const ServiceWorkerRegistrationObjectInfo& info, |
| - const ServiceWorkerVersionAttributes& attrs); |
| - |
| RegistrationCallbackMap pending_registration_callbacks_; |
| UpdateCallbackMap pending_update_callbacks_; |
| UnregistrationCallbackMap pending_unregistration_callbacks_; |