Chromium Code Reviews| Index: content/public/browser/service_worker_context.h |
| diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h |
| index 22c989b4ce8254ddfd423421af59aec9cec2f69c..ae05d98a527f7a2cf64ee404e82a2ab0da15a449 100644 |
| --- a/content/public/browser/service_worker_context.h |
| +++ b/content/public/browser/service_worker_context.h |
| @@ -32,6 +32,9 @@ class ServiceWorkerContext { |
| typedef base::Callback<void(const std::vector<ServiceWorkerUsageInfo>& |
| usage_info)> GetUsageInfoCallback; |
| + typedef base::Callback<void(bool has_same_service_worker)> |
| + CheckHasSameServiceWorkerCallback; |
| + |
| // Registers the header name which should not be passed to the ServiceWorker. |
| // Must be called from the IO thread. |
| CONTENT_EXPORT static void AddExcludedHeadersForFetchEvent( |
| @@ -73,7 +76,7 @@ class ServiceWorkerContext { |
| // TODO(jyasskin): Provide a way to SendMessage to a Scope. |
| - // Determines if a request for 'url' can be satisfied while offline. |
| + // Determines if a request for |url| can be satisfied while offline. |
| // This method always completes asynchronously. |
| virtual void CanHandleMainResourceOffline(const GURL& url, |
| const GURL& first_party, |
| @@ -84,6 +87,13 @@ class ServiceWorkerContext { |
| virtual void GetAllOriginsInfo(const GetUsageInfoCallback& callback) = 0; |
| virtual void DeleteForOrigin(const GURL& origin_url) = 0; |
| + // Determines if an active Service Worker registration exists that matches |
| + // |url|, and if the same registration also matches |other_url|. |
| + virtual void CheckHasSameServiceWorker( |
|
falken
2015/02/05 15:46:46
This name is a bit off since it's only checking wh
benwells
2015/02/05 17:45:08
Done.
|
| + const GURL& url, |
| + const GURL& other_url, |
| + const CheckHasSameServiceWorkerCallback& callback) = 0; |
| + |
| protected: |
| ServiceWorkerContext() {} |
| virtual ~ServiceWorkerContext() {} |