| Index: content/browser/service_worker/service_worker_register_job.h
|
| diff --git a/content/browser/service_worker/service_worker_register_job.h b/content/browser/service_worker/service_worker_register_job.h
|
| index 46aa9c89dbc05ae48ee815e6027cc9eb42154613..fbe02288a2e5a5d9585d392e814714301ad72476 100644
|
| --- a/content/browser/service_worker/service_worker_register_job.h
|
| +++ b/content/browser/service_worker/service_worker_register_job.h
|
| @@ -54,6 +54,29 @@ class ServiceWorkerRegisterJob : public ServiceWorkerRegisterJobBase {
|
| virtual RegistrationJobType GetType() OVERRIDE;
|
|
|
| private:
|
| + enum Phase {
|
| + INITIAL,
|
| + START,
|
| + REGISTER,
|
| + UPDATE,
|
| + INSTALL,
|
| + ACTIVATE,
|
| + COMPLETE
|
| + };
|
| +
|
| + struct ServiceWorkerRegisterJobInternal {
|
| + ServiceWorkerRegisterJobInternal()
|
| + : registration_(NULL), pending_version_(NULL) {}
|
| +
|
| + scoped_refptr<ServiceWorkerRegistration> registration_;
|
| + scoped_refptr<ServiceWorkerVersion> pending_version_;
|
| + };
|
| +
|
| + void set_registration(ServiceWorkerRegistration* registration);
|
| + ServiceWorkerRegistration* registration();
|
| + void set_pending_version(ServiceWorkerVersion* version);
|
| + ServiceWorkerVersion* pending_version();
|
| +
|
| void HandleExistingRegistrationAndContinue(
|
| ServiceWorkerStatusCode status,
|
| const scoped_refptr<ServiceWorkerRegistration>& registration);
|
| @@ -68,14 +91,15 @@ class ServiceWorkerRegisterJob : public ServiceWorkerRegisterJobBase {
|
| void RunCallbacks(ServiceWorkerStatusCode status,
|
| ServiceWorkerVersion* version);
|
|
|
| - // The ServiceWorkerStorage object should always outlive this.
|
| + // The ServiceWorkerContextCore object should always outlive this.
|
| base::WeakPtr<ServiceWorkerContextCore> context_;
|
| - scoped_refptr<ServiceWorkerRegistration> registration_;
|
| - scoped_refptr<ServiceWorkerVersion> pending_version_;
|
| +
|
| const GURL pattern_;
|
| const GURL script_url_;
|
| std::vector<RegistrationCallback> callbacks_;
|
| std::vector<int> pending_process_ids_;
|
| + Phase phase_;
|
| + ServiceWorkerRegisterJobInternal internal_;
|
| base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
|
|
|