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

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

Issue 1017453006: ServiceWorker: Merge FindSWRegistration into FindOrCreateRegistration for cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refcount_test
Patch Set: Created 5 years, 9 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 4102943974c73c98d9691bd048053ff041e42947..931da004e6421b4984c7f64154bbdd3f11a95e58 100644
--- a/content/child/service_worker/service_worker_dispatcher.h
+++ b/content/child/service_worker/service_worker_dispatcher.h
@@ -112,14 +112,6 @@ class CONTENT_EXPORT ServiceWorkerDispatcher
const ServiceWorkerObjectInfo& info,
bool adopt_handle);
- // Finds a WebServiceWorkerRegistrationImpl for the specified registration.
- // If it's not found, returns NULL. If |adopt_handle| is true,
- // a ServiceWorkerRegistrationHandleReference will be adopted for the
- // registration.
- WebServiceWorkerRegistrationImpl* FindServiceWorkerRegistration(
- const ServiceWorkerRegistrationObjectInfo& 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
@@ -234,6 +226,11 @@ 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);
« 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