1 // Copyright 2024 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "net/device_bound_sessions/session_key.h" 6 7 namespace net::device_bound_sessions { 8 9 SessionKey::SessionKey() = default; SessionKey(SchemefulSite site,Id id)10SessionKey::SessionKey(SchemefulSite site, Id id) : site(site), id(id) {} 11 SessionKey::~SessionKey() = default; 12 13 SessionKey::SessionKey(const SessionKey&) = default; 14 SessionKey& SessionKey::operator=(const SessionKey&) = default; 15 16 SessionKey::SessionKey(SessionKey&&) = default; 17 SessionKey& SessionKey::operator=(SessionKey&&) = default; 18 19 bool SessionKey::operator==(const SessionKey& other) const = default; operator <(const SessionKey & other) const20bool SessionKey::operator<(const SessionKey& other) const { 21 if (site != other.site) { 22 return site < other.site; 23 } 24 return id.value() < other.id.value(); 25 } 26 27 } // namespace net::device_bound_sessions 28