properties_based_quic_server_info.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_
  5. #define NET_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "base/memory/weak_ptr.h"
  8. #include "net/base/net_export.h"
  9. #include "net/base/network_isolation_key.h"
  10. #include "net/quic/quic_server_info.h"
  11. namespace net {
  12. class HttpServerProperties;
  13. // PropertiesBasedQuicServerInfo fetches information about a QUIC server from
  14. // HttpServerProperties. Since the information is defined to be non-sensitive,
  15. // it's ok for us to keep it on disk.
  16. class NET_EXPORT_PRIVATE PropertiesBasedQuicServerInfo : public QuicServerInfo {
  17. public:
  18. PropertiesBasedQuicServerInfo(
  19. const quic::QuicServerId& server_id,
  20. const NetworkIsolationKey& network_isolation_key,
  21. HttpServerProperties* http_server_properties);
  22. PropertiesBasedQuicServerInfo(const PropertiesBasedQuicServerInfo&) = delete;
  23. PropertiesBasedQuicServerInfo& operator=(
  24. const PropertiesBasedQuicServerInfo&) = delete;
  25. ~PropertiesBasedQuicServerInfo() override;
  26. // QuicServerInfo implementation.
  27. bool Load() override;
  28. void Persist() override;
  29. private:
  30. const NetworkIsolationKey network_isolation_key_;
  31. const raw_ptr<HttpServerProperties> http_server_properties_;
  32. };
  33. } // namespace net
  34. #endif // NET_QUIC_PROPERTIES_BASED_QUIC_SERVER_INFO_H_