• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/quic/quic_session_alias_key.h"
6 
7 #include <tuple>
8 
9 #include "net/quic/quic_session_key.h"
10 #include "url/scheme_host_port.h"
11 
12 namespace net {
13 
QuicSessionAliasKey(url::SchemeHostPort destination,QuicSessionKey session_key)14 QuicSessionAliasKey::QuicSessionAliasKey(url::SchemeHostPort destination,
15                                          QuicSessionKey session_key)
16     : destination_(std::move(destination)),
17       session_key_(std::move(session_key)) {}
18 
operator <(const QuicSessionAliasKey & other) const19 bool QuicSessionAliasKey::operator<(const QuicSessionAliasKey& other) const {
20   return std::tie(destination_, session_key_) <
21          std::tie(other.destination_, other.session_key_);
22 }
23 
operator ==(const QuicSessionAliasKey & other) const24 bool QuicSessionAliasKey::operator==(const QuicSessionAliasKey& other) const {
25   return destination_ == other.destination_ &&
26          session_key_ == other.session_key_;
27 }
28 
29 }  // namespace net
30