| 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 98b87b6080f1dc5ea38f66feaccf3c9b8f716f66..9ce8071b09d46dffe37985e45c494e2e20539d34 100644
|
| --- a/content/browser/service_worker/service_worker_version.h
|
| +++ b/content/browser/service_worker/service_worker_version.h
|
| @@ -109,8 +109,8 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| virtual void OnControlleeRemoved(ServiceWorkerVersion* version,
|
| ServiceWorkerProviderHost* provider_host) {
|
| }
|
| - // Fires when a version transitions from having a controllee to not.
|
| virtual void OnNoControllees(ServiceWorkerVersion* version) {}
|
| + virtual void OnNoInflightRequests(ServiceWorkerVersion* version) {}
|
| virtual void OnCachedMetadataUpdated(ServiceWorkerVersion* version) {}
|
|
|
| protected:
|
| @@ -274,8 +274,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| void DispatchSimpleEvent(int request_id, const IPC::Message& message);
|
|
|
| // 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);
|
|
|
| @@ -344,6 +342,8 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| // Simulate ping timeout. Should be used for tests-only.
|
| void SimulatePingTimeoutForTesting();
|
|
|
| + bool HasInflightRequests() const;
|
| +
|
| private:
|
| friend class base::RefCounted<ServiceWorkerVersion>;
|
| friend class ServiceWorkerMetrics;
|
| @@ -380,6 +380,9 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, MixedRequestTimeouts);
|
| FRIEND_TEST_ALL_PREFIXES(ServiceWorkerURLRequestJobTest, EarlyResponse);
|
| FRIEND_TEST_ALL_PREFIXES(ServiceWorkerURLRequestJobTest, CancelRequest);
|
| + FRIEND_TEST_ALL_PREFIXES(ServiceWorkerActivationTest, SkipWaiting);
|
| + FRIEND_TEST_ALL_PREFIXES(ServiceWorkerActivationTest,
|
| + SkipWaitingWithInflightRequest);
|
|
|
| class Metrics;
|
| class PingController;
|
| @@ -599,7 +602,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
|
| // Stops the worker if it is idle (has no in-flight requests) or timed out
|
| // ping.
|
| void StopWorkerIfIdle();
|
| - bool HasInflightRequests() const;
|
|
|
| // RecordStartWorkerResult is added as a start callback by StartTimeoutTimer
|
| // and records metrics about startup.
|
|
|