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

Side by Side Diff: content/browser/service_worker/service_worker_register_job.h

Issue 377153003: Service Worker: set active worker to REDUNDANT when unregistered (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 ABORT, 78 ABORT,
79 }; 79 };
80 80
81 // Holds internal state of ServiceWorkerRegistrationJob, to compel use of the 81 // Holds internal state of ServiceWorkerRegistrationJob, to compel use of the
82 // getter/setter functions. 82 // getter/setter functions.
83 struct Internal { 83 struct Internal {
84 Internal(); 84 Internal();
85 ~Internal(); 85 ~Internal();
86 scoped_refptr<ServiceWorkerRegistration> registration; 86 scoped_refptr<ServiceWorkerRegistration> registration;
87 87
88 // Holds 'installing' or 'waiting' version depending on the phase. 88 // Holds the version created by this job. It can be the 'installing',
89 // 'waiting', or 'active' version depending on the phase.
89 scoped_refptr<ServiceWorkerVersion> new_version; 90 scoped_refptr<ServiceWorkerVersion> new_version;
90 }; 91 };
91 92
92 void set_registration(ServiceWorkerRegistration* registration); 93 void set_registration(ServiceWorkerRegistration* registration);
93 ServiceWorkerRegistration* registration(); 94 ServiceWorkerRegistration* registration();
94 void set_new_version(ServiceWorkerVersion* version); 95 void set_new_version(ServiceWorkerVersion* version);
95 ServiceWorkerVersion* new_version(); 96 ServiceWorkerVersion* new_version();
96 97
97 void SetPhase(Phase phase); 98 void SetPhase(Phase phase);
98 99
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; 156 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_;
156 scoped_refptr<ServiceWorkerVersion> promise_resolved_version_; 157 scoped_refptr<ServiceWorkerVersion> promise_resolved_version_;
157 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; 158 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
158 159
159 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); 160 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
160 }; 161 };
161 162
162 } // namespace content 163 } // namespace content
163 164
164 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 165 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698