1 // Copyright 2015 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_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ 6 #define NET_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ 7 8 #include "base/memory/raw_ptr.h" 9 #include "base/memory/weak_ptr.h" 10 #include "net/base/net_export.h" 11 #include "net/base/network_anonymization_key.h" 12 #include "net/quic/quic_server_info.h" 13 14 namespace net { 15 16 class HttpServerProperties; 17 18 // PropertiesBasedQuicServerInfo fetches information about a QUIC server from 19 // HttpServerProperties. Since the information is defined to be non-sensitive, 20 // it's ok for us to keep it on disk. 21 class NET_EXPORT_PRIVATE PropertiesBasedQuicServerInfo : public QuicServerInfo { 22 public: 23 PropertiesBasedQuicServerInfo( 24 const quic::QuicServerId& server_id, 25 const NetworkAnonymizationKey& network_anonymization_key, 26 HttpServerProperties* http_server_properties); 27 28 PropertiesBasedQuicServerInfo(const PropertiesBasedQuicServerInfo&) = delete; 29 PropertiesBasedQuicServerInfo& operator=( 30 const PropertiesBasedQuicServerInfo&) = delete; 31 32 ~PropertiesBasedQuicServerInfo() override; 33 34 // QuicServerInfo implementation. 35 bool Load() override; 36 void Persist() override; 37 38 private: 39 const NetworkAnonymizationKey network_anonymization_key_; 40 const raw_ptr<HttpServerProperties> http_server_properties_; 41 }; 42 43 } // namespace net 44 45 #endif // NET_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ 46