xref: /aosp_15_r20/external/cronet/net/extras/shared_dictionary/shared_dictionary_usage_info.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2023 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 #ifndef NET_EXTRAS_SHARED_DICTIONARY_SHARED_DICTIONARY_USAGE_INFO_H_
6 #define NET_EXTRAS_SHARED_DICTIONARY_SHARED_DICTIONARY_USAGE_INFO_H_
7 
8 #include "base/component_export.h"
9 #include "net/extras/shared_dictionary/shared_dictionary_isolation_key.h"
10 
11 namespace net {
12 
COMPONENT_EXPORT(NET_SHARED_DICTIONARY)13 struct COMPONENT_EXPORT(NET_SHARED_DICTIONARY) SharedDictionaryUsageInfo {
14   bool operator==(const SharedDictionaryUsageInfo& other) const {
15     return std::tie(isolation_key, total_size_bytes) ==
16            std::tie(other.isolation_key, other.total_size_bytes);
17   }
18   bool operator!=(const SharedDictionaryUsageInfo& other) const {
19     return !(*this == other);
20   }
21 
22   SharedDictionaryIsolationKey isolation_key;
23   uint64_t total_size_bytes = 0;
24 };
25 
26 }  // namespace net
27 
28 #endif  // NET_EXTRAS_SHARED_DICTIONARY_SHARED_DICTIONARY_USAGE_Info_H_
29