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

Unified Diff: content/browser/service_worker/embedded_worker_registry.h

Issue 2307543002: ServiceWorker: Mojofication of EWInstance::StopWorker (Closed)
Patch Set: Added a unittest file Created 4 years, 3 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/browser/service_worker/embedded_worker_registry.h
diff --git a/content/browser/service_worker/embedded_worker_registry.h b/content/browser/service_worker/embedded_worker_registry.h
index b0e06092268aef7535d088642ec845ad07bc62c0..aa66be43cea4743b6ade0fa06d576941d557e357 100644
--- a/content/browser/service_worker/embedded_worker_registry.h
+++ b/content/browser/service_worker/embedded_worker_registry.h
@@ -109,10 +109,13 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
private:
friend class base::RefCounted<EmbeddedWorkerRegistry>;
+ friend class MojoEmbeddedWorkerInstanceTest;
friend class EmbeddedWorkerInstance;
friend class EmbeddedWorkerInstanceTest;
FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest,
RemoveWorkerInSharedProcess);
+ FRIEND_TEST_ALL_PREFIXES(MojoEmbeddedWorkerInstanceTest,
+ RemoveWorkerInSharedProcess);
using WorkerInstanceMap = std::map<int, EmbeddedWorkerInstance*>;
using ProcessToSenderMap = std::map<int, IPC::Sender*>;
@@ -135,6 +138,10 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
// |process_id| could be invalid (i.e. ChildProcessHost::kInvalidUniqueID)
// if it's not running.
void RemoveWorker(int process_id, int embedded_worker_id);
+ // DetachWorker is called when EmbeddedWorkerInstance releases a process.
+ // |process_id| could be invalid (i.e. ChildProcessHost::kInvalidUniqueID)
+ // if it's not running.
+ void DetachWorker(int process_id, int embedded_worker_id);
EmbeddedWorkerInstance* GetWorkerForMessage(int process_id,
int embedded_worker_id);

Powered by Google App Engine
This is Rietveld 408576698