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 c095f9d1314c7fe028441bb19479c2f73d4fc99e..6874423f4600e669eed81f1d9b97df4d1828bfd8 100644 |
| --- a/content/public/browser/service_worker_context.h |
| +++ b/content/public/browser/service_worker_context.h |
| @@ -125,6 +125,12 @@ class ServiceWorkerContext { |
| // This function can be called from any thread. |
| virtual void StopAllServiceWorkersForOrigin(const GURL& origin) = 0; |
| + // As above, but |callback| is executed when a running worker is stopped. If |
| + // there is no running worker, |callback| will never be executed. |
|
horo
2017/01/05 05:33:58
Please write comment that the |callback| is execut
mattcary
2017/01/05 14:30:43
Done.
Note that the RunSoon helper defined in ser
horo
2017/01/06 02:27:41
The |callback| should be called only once when the
mattcary
2017/01/06 15:21:22
Ah, I misunderstood. That's a good idea, done.
|
| + virtual void StopAllServiceWorkersForOriginWithCallback( |
| + const GURL& origin, |
| + const base::Closure& callback) = 0; |
| + |
| // Stops all running service workers and unregisters all service worker |
| // registrations. This method is used in LayoutTests to make sure that the |
| // existing service worker will not affect the succeeding tests. |