#ifndef NET_DEVICE_BOUND_SESSIONS_SESSION_KEY_H_
#define NET_DEVICE_BOUND_SESSIONS_SESSION_KEY_H_
#include "base/hash/hash.h"
#include "base/types/strong_alias.h"
#include "net/base/schemeful_site.h"
namespace net::device_bound_sessions {
struct NET_EXPORT SessionKey {
using Id = base::StrongAlias<class IdTag, std::string>;
SessionKey();
SessionKey(SchemefulSite site, Id id);
~SessionKey();
SessionKey(const SessionKey&);
SessionKey& operator=(const SessionKey&);
SessionKey(SessionKey&&);
SessionKey& operator=(SessionKey&&);
SchemefulSite site;
Id id;
bool operator==(const SessionKey& other) const;
bool operator<(const SessionKey& other) const;
};
}
namespace std {
template <>
struct hash<net::device_bound_sessions::SessionKey::Id> {
std::size_t operator()(
const net::device_bound_sessions::SessionKey::Id& session_id) const {
return std::hash<std::string>()(session_id.value());
}
};
}
#endif