#ifndef EXTENSIONS_BROWSER_SERVICE_WORKER_WORKER_ID_H_
#define EXTENSIONS_BROWSER_SERVICE_WORKER_WORKER_ID_H_
#include <stdint.h>
#include <optional>
#include <ostream>
#include "extensions/common/extension_id.h"
#include "third_party/blink/public/common/tokens/tokens.h"
namespace extensions {
struct WorkerId {
WorkerId();
WorkerId(const ExtensionId& extension_id,
int render_process_id,
int64_t version_id,
int thread_id);
WorkerId(const ExtensionId& extension_id,
int render_process_id,
int64_t version_id,
int thread_id,
const blink::ServiceWorkerToken& start_token);
ExtensionId extension_id;
int render_process_id;
int64_t version_id;
int thread_id;
std::optional<blink::ServiceWorkerToken> start_token;
bool operator<(const WorkerId& other) const;
bool operator==(const WorkerId& other) const;
bool operator!=(const WorkerId& other) const;
};
std::ostream& operator<<(std::ostream& out, const WorkerId& id);
}
#endif