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

Unified Diff: content/public/browser/service_worker_context.h

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 72650154c721daaa19b9511aabc62f9ff028e167..3514de98393c928c35349effc78267eb126e5c35 100644
--- a/content/public/browser/service_worker_context.h
+++ b/content/public/browser/service_worker_context.h
@@ -14,6 +14,8 @@
namespace content {
+class StoragePartition;
+
// Represents the per-StoragePartition ServiceWorker data.
class ServiceWorkerContext {
public:
@@ -38,6 +40,13 @@ class ServiceWorkerContext {
// Must be called from the IO thread.
static bool IsExcludedHeaderNameForFetchEvent(const std::string& header_name);
+ CONTENT_EXPORT static void IncrementEmbeddedWorkerRefCount(
+ StoragePartition* storage_partition,
+ int embedded_worker_id);
+ CONTENT_EXPORT static void DecrementEmbeddedWorkerRefCount(
+ StoragePartition* storage_partition,
+ int embedded_worker_id);
+
// Equivalent to calling navigator.serviceWorker.register(script_url, {scope:
// pattern}) from a renderer, except that |pattern| is an absolute URL instead
// of relative to some current origin. |callback| is passed true when the JS

Powered by Google App Engine
This is Rietveld 408576698