// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_BROWSER_SERVICE_WORKER_WORKER_ID_SET_H_ #define EXTENSIONS_BROWSER_SERVICE_WORKER_WORKER_ID_SET_H_ #include <set> #include <vector> #include "base/auto_reset.h" #include "base/debug/crash_logging.h" #include "extensions/browser/service_worker/worker_id.h" #include "extensions/common/extension_id.h" namespace content { class BrowserContext; } // Set of WorkersIds that provides faster retrieval/removal of workers by // extension id, render process id etc. namespace extensions { class WorkerIdSet { … }; namespace debug { // Helper for adding a set of multiple worker related crash keys. // // It is meant to be created when we detect exactly two entries for the same // worker that will be recorded in `WorkerIdSet::Add()`. // // These crash keys set information relevant to when two workers are attempting // to be added to the `WorkerIdSet`. All keys are logged every time this class // is instantiated. Each key describes its possible values. // // The "previous" `WorkerId` is the one that existed before // `WorkerIdSet::Add()` is called. The "new" `WorkerId` is the duplicate that // will be added once `WorkerIdSet::Add()` completes. class ScopedMultiWorkerCrashKeys { … }; } // namespace debug } // namespace extensions #endif // EXTENSIONS_BROWSER_SERVICE_WORKER_WORKER_ID_SET_H_