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

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

Issue 140743012: Start EmbeddedWorker during registration - take 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up log messages, tests Created 6 years, 11 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/service_worker_job_coordinator.h
diff --git a/content/browser/service_worker/service_worker_job_coordinator.h b/content/browser/service_worker/service_worker_job_coordinator.h
index d590f0fcc2d553fa5e819a5f0d3e4c8cb334b89b..7dd42a39237e58c12ff190fb03346e289ad4e50e 100644
--- a/content/browser/service_worker/service_worker_job_coordinator.h
+++ b/content/browser/service_worker/service_worker_job_coordinator.h
@@ -18,20 +18,24 @@
namespace content {
class ServiceWorkerRegistration;
+class EmbeddedWorkerRegistry;
// This class manages all in-flight jobs. Any asynchronous
// operations are run through instances of ServiceWorkerRegisterJob.
class CONTENT_EXPORT ServiceWorkerJobCoordinator {
public:
- explicit ServiceWorkerJobCoordinator(ServiceWorkerStorage* storage);
+ explicit ServiceWorkerJobCoordinator(ServiceWorkerStorage* storage,
+ EmbeddedWorkerRegistry* registry);
~ServiceWorkerJobCoordinator();
void Register(const GURL& pattern,
const GURL& script_url,
+ int source_process_id,
const ServiceWorkerRegisterJob::RegistrationCallback& callback);
void Unregister(
const GURL& pattern,
+ int source_process_id,
const ServiceWorkerRegisterJob::UnregistrationCallback& callback);
// Jobs are removed whenever they are finished or canceled.
@@ -46,6 +50,7 @@ class CONTENT_EXPORT ServiceWorkerJobCoordinator {
~JobQueue();
void Push(scoped_ptr<ServiceWorkerRegisterJob> job,
+ int source_process_id,
const ServiceWorkerRegisterJob::RegistrationCallback& callback);
void Pop(ServiceWorkerRegisterJob* job);
@@ -66,6 +71,7 @@ class CONTENT_EXPORT ServiceWorkerJobCoordinator {
// The ServiceWorkerStorage object should always outlive this
ServiceWorkerStorage* storage_;
+ EmbeddedWorkerRegistry* worker_registry_;
base::WeakPtrFactory<ServiceWorkerJobCoordinator> weak_factory_;
RegistrationJobMap jobs_;

Powered by Google App Engine
This is Rietveld 408576698