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

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

Issue 360123002: ServiceWorker: some more groundwork in support of the update process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index bc5a31b8061d29d3b1031d9b8ff79112d12e08c8..314880506c1fa86275876cd5901e680cede312c5 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -38,10 +38,6 @@ class ServiceWorkerVersionInfo;
// more than one ServiceWorkerVersion "running" at a time, but only
// one of them is active. This class connects the actual script with a
// running worker.
-//
-// is_shutdown_ detects the live-ness of the object itself. If the object is
-// shut down, then it is in the process of being deleted from memory.
-// This happens when a version is replaced as well as at browser shutdown.
class CONTENT_EXPORT ServiceWorkerVersion
: NON_EXPORTED_BASE(public base::RefCounted<ServiceWorkerVersion>),
public EmbeddedWorkerInstance::Listener {
@@ -205,10 +201,12 @@ class CONTENT_EXPORT ServiceWorkerVersion
bool HasProcessToRun() const;
// Adds and removes |provider_host| as a controllee of this ServiceWorker.
+ // A potential controllee is a host having the version as its .installing
+ // or .waiting version.
void AddControllee(ServiceWorkerProviderHost* provider_host);
void RemoveControllee(ServiceWorkerProviderHost* provider_host);
- void AddWaitingControllee(ServiceWorkerProviderHost* provider_host);
- void RemoveWaitingControllee(ServiceWorkerProviderHost* provider_host);
+ void AddPotentialControllee(ServiceWorkerProviderHost* provider_host);
+ void RemovePotentialControllee(ServiceWorkerProviderHost* provider_host);
// Returns if it has controllee.
bool HasControllee() const { return !controllee_map_.empty(); }

Powered by Google App Engine
This is Rietveld 408576698