| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ | 5 #ifndef NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ |
| 6 #define NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ | 6 #define NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // HttpServerProperties. Since the information is defined to be non-sensitive, | 23 // HttpServerProperties. Since the information is defined to be non-sensitive, |
| 24 // it's ok for us to keep it on disk. | 24 // it's ok for us to keep it on disk. |
| 25 class QUIC_EXPORT_PRIVATE PropertiesBasedQuicServerInfo | 25 class QUIC_EXPORT_PRIVATE PropertiesBasedQuicServerInfo |
| 26 : public QuicServerInfo { | 26 : public QuicServerInfo { |
| 27 public: | 27 public: |
| 28 PropertiesBasedQuicServerInfo(const QuicServerId& server_id, | 28 PropertiesBasedQuicServerInfo(const QuicServerId& server_id, |
| 29 HttpServerProperties* http_server_properties); | 29 HttpServerProperties* http_server_properties); |
| 30 ~PropertiesBasedQuicServerInfo() override; | 30 ~PropertiesBasedQuicServerInfo() override; |
| 31 | 31 |
| 32 // QuicServerInfo implementation. | 32 // QuicServerInfo implementation. |
| 33 void Start() override; | 33 bool Load() override; |
| 34 int WaitForDataReady(const CompletionCallback& callback) override; | |
| 35 void ResetWaitForDataReadyCallback() override; | |
| 36 void CancelWaitForDataReadyCallback() override; | |
| 37 bool IsDataReady() override; | |
| 38 bool IsReadyToPersist() override; | |
| 39 void Persist() override; | 34 void Persist() override; |
| 40 void OnExternalCacheHit() override; | |
| 41 size_t EstimateMemoryUsage() const override; | 35 size_t EstimateMemoryUsage() const override; |
| 42 | 36 |
| 43 private: | 37 private: |
| 44 HttpServerProperties* http_server_properties_; | 38 HttpServerProperties* http_server_properties_; |
| 45 | 39 |
| 46 DISALLOW_COPY_AND_ASSIGN(PropertiesBasedQuicServerInfo); | 40 DISALLOW_COPY_AND_ASSIGN(PropertiesBasedQuicServerInfo); |
| 47 }; | 41 }; |
| 48 | 42 |
| 49 class QUIC_EXPORT_PRIVATE PropertiesBasedQuicServerInfoFactory | |
| 50 : public QuicServerInfoFactory { | |
| 51 public: | |
| 52 explicit PropertiesBasedQuicServerInfoFactory( | |
| 53 HttpServerProperties* http_server_properties); | |
| 54 ~PropertiesBasedQuicServerInfoFactory() override; | |
| 55 | |
| 56 std::unique_ptr<QuicServerInfo> GetForServer( | |
| 57 const QuicServerId& server_id) override; | |
| 58 | |
| 59 private: | |
| 60 HttpServerProperties* http_server_properties_; | |
| 61 | |
| 62 DISALLOW_COPY_AND_ASSIGN(PropertiesBasedQuicServerInfoFactory); | |
| 63 }; | |
| 64 | |
| 65 } // namespace net | 43 } // namespace net |
| 66 | 44 |
| 67 #endif // NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ | 45 #endif // NET_QUIC_CHROMIUM_PROPERTIES_BASED_QUIC_SERVER_INFO_H_ |
| OLD | NEW |