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

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

Issue 2227593002: ServiceWorker: Implement StartWorker by using mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added argument check and updated comment and BUILD.gn 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 8e83b1dabbfd5983cd038d4e62ddbbde1f8730e7..b0e06092268aef7535d088642ec845ad07bc62c0 100644
--- a/content/browser/service_worker/embedded_worker_registry.h
+++ b/content/browser/service_worker/embedded_worker_registry.h
@@ -114,10 +114,10 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest,
RemoveWorkerInSharedProcess);
- typedef std::map<int, EmbeddedWorkerInstance*> WorkerInstanceMap;
- typedef std::map<int, IPC::Sender*> ProcessToSenderMap;
- typedef std::map<int, MessagePortMessageFilter*>
- ProcessToMessagePortMessageFilterMap;
+ using WorkerInstanceMap = std::map<int, EmbeddedWorkerInstance*>;
+ using ProcessToSenderMap = std::map<int, IPC::Sender*>;
+ using ProcessToMessagePortMessageFilterMap =
+ std::map<int, MessagePortMessageFilter*>;
EmbeddedWorkerRegistry(
const base::WeakPtr<ServiceWorkerContextCore>& context,
@@ -126,6 +126,11 @@ class CONTENT_EXPORT EmbeddedWorkerRegistry
ServiceWorkerStatusCode Send(int process_id, IPC::Message* message);
+ // Called when EmbeddedWorkerInstance gets ready for IPC. This function
+ // prepares a route to the child worker thread.
+ // TODO(shimazu): Remove this function once mojofication is completed.
+ ServiceWorkerStatusCode AddWorker(int process_id, int embedded_worker_id);
falken 2016/09/07 05:01:42 I see it's just temporary but I'd prefer a more pr
shimazu 2016/09/12 06:28:19 Done.
+
// RemoveWorker is called when EmbeddedWorkerInstance is destructed.
// |process_id| could be invalid (i.e. ChildProcessHost::kInvalidUniqueID)
// if it's not running.

Powered by Google App Engine
This is Rietveld 408576698