| 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 34601a39ea0808100f06c1b7bb181e1dd0727f6f..07b6e9c59b1e62676e339edb100782fb9c6536cf 100644
|
| --- a/content/browser/service_worker/service_worker_version.h
|
| +++ b/content/browser/service_worker/service_worker_version.h
|
| @@ -373,14 +373,21 @@
|
| class Metrics;
|
| class PingController;
|
|
|
| + enum RequestType {
|
| + REQUEST_CUSTOM,
|
| + NUM_REQUEST_TYPES
|
| + };
|
| +
|
| struct RequestInfo {
|
| RequestInfo(int id,
|
| + RequestType type,
|
| ServiceWorkerMetrics::EventType event_type,
|
| const base::TimeTicks& expiration,
|
| TimeoutBehavior timeout_behavior);
|
| ~RequestInfo();
|
| bool operator>(const RequestInfo& other) const;
|
| int id;
|
| + RequestType type;
|
| ServiceWorkerMetrics::EventType event_type;
|
| base::TimeTicks expiration;
|
| TimeoutBehavior timeout_behavior;
|
| @@ -587,6 +594,25 @@
|
| // and records metrics about startup.
|
| void RecordStartWorkerResult(ServiceWorkerStatusCode status);
|
|
|
| + template <typename IDMAP>
|
| + void RemoveCallbackAndStopIfRedundant(IDMAP* callbacks, int request_id);
|
| +
|
| + template <typename CallbackType>
|
| + int AddRequest(
|
| + const CallbackType& callback,
|
| + IDMap<PendingRequest<CallbackType>, IDMapOwnPointer>* callback_map,
|
| + RequestType request_type,
|
| + ServiceWorkerMetrics::EventType event_type);
|
| +
|
| + template <typename CallbackType>
|
| + int AddRequestWithExpiration(
|
| + const CallbackType& callback,
|
| + IDMap<PendingRequest<CallbackType>, IDMapOwnPointer>* callback_map,
|
| + RequestType request_type,
|
| + ServiceWorkerMetrics::EventType event_type,
|
| + base::TimeTicks expiration,
|
| + TimeoutBehavior timeout_behavior);
|
| +
|
| bool MaybeTimeOutRequest(const RequestInfo& info);
|
| void SetAllRequestExpirations(const base::TimeTicks& expiration);
|
|
|
|
|