Chromium Code Reviews| Index: public/platform/WebServiceWorkerCacheStorage.h |
| diff --git a/public/platform/WebServiceWorkerCacheStorage.h b/public/platform/WebServiceWorkerCacheStorage.h |
| index 8d867bda8173604b6b4debdbed695c027b161ded..2a16865e0231d6fea6874c0c0e40d86f3f72e2df 100644 |
| --- a/public/platform/WebServiceWorkerCacheStorage.h |
| +++ b/public/platform/WebServiceWorkerCacheStorage.h |
| @@ -15,7 +15,7 @@ namespace blink { |
| class WebServiceWorkerCache; |
| -// An interface to the CacheStorage API, implemented by the embedder and passed in to blink. Blink's implementation |
| +// An interface to the CacheStorage API, implemented by the embedder and passed in to Blink. Blink's implementation |
| // of the ServiceWorker spec will call these methods to create/open caches, and expect callbacks from the embedder |
| // after operations complete. |
| class WebServiceWorkerCacheStorage { |
| @@ -26,8 +26,12 @@ public: |
| virtual ~WebServiceWorkerCacheStorage() { } |
| - // Ownership of the CacheStorage*Callbacks methods passes to the WebServiceWorkerCacheStorage |
| - // instance, which will delete it after calling onSuccess or onFailure. |
| + // Ownership of the CacheStorage*Callbacks methods passes to the WebServiceWorkerCacheStorage instance, which |
| + // will delete it after calling onSuccess or onFailure. |
| + |
| + // dispatchGet() or dispatchCreate() can return a WebServiceWorkerCache object, and these objects are owned by |
| + // Blink, and should be destroyed when they are no longer needed. However, the implementation also will return |
| + // the same WebServiceWorkerCache* object if the user opens the same Cache again. |
|
dominicc (has gone to gerrit)
2014/08/15 06:20:24
This seems fraught; how is the ownership transferr
gavinp
2014/08/19 21:09:37
I think we spoke about this offline: if the blink
|
| virtual void dispatchGet(CacheStorageWithCacheCallbacks*, const WebString& cacheName) = 0; |
| virtual void dispatchHas(CacheStorageCallbacks*, const WebString& cacheName) = 0; |
| virtual void dispatchCreate(CacheStorageWithCacheCallbacks*, const WebString& cacheName) = 0; |