| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_SERVER_INFO_H_ | 5 #ifndef NET_QUIC_CHROMIUM_QUIC_SERVER_INFO_H_ |
| 6 #define NET_QUIC_CHROMIUM_QUIC_SERVER_INFO_H_ | 6 #define NET_QUIC_CHROMIUM_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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // Persist allows for the server information to be updated for future users. | 95 // Persist allows for the server information to be updated for future users. |
| 96 // This is a fire and forget operation: the caller may drop its reference | 96 // This is a fire and forget operation: the caller may drop its reference |
| 97 // from this object and the store operation will still complete. This can | 97 // from this object and the store operation will still complete. This can |
| 98 // only be called once WaitForDataReady has returned OK or called its | 98 // only be called once WaitForDataReady has returned OK or called its |
| 99 // callback. | 99 // callback. |
| 100 virtual void Persist() = 0; | 100 virtual void Persist() = 0; |
| 101 | 101 |
| 102 // Called whenever an external cache reuses quic server config. | 102 // Called whenever an external cache reuses quic server config. |
| 103 virtual void OnExternalCacheHit() = 0; | 103 virtual void OnExternalCacheHit() = 0; |
| 104 | 104 |
| 105 // Returns the size of dynamically allocated memory in bytes. |
| 106 virtual size_t EstimateMemoryUsage() const = 0; |
| 107 |
| 105 struct State { | 108 struct State { |
| 106 State(); | 109 State(); |
| 107 ~State(); | 110 ~State(); |
| 108 | 111 |
| 109 void Clear(); | 112 void Clear(); |
| 110 | 113 |
| 111 // This class matches QuicClientCryptoConfig::CachedState. | 114 // This class matches QuicClientCryptoConfig::CachedState. |
| 112 std::string server_config; // A serialized handshake message. | 115 std::string server_config; // A serialized handshake message. |
| 113 std::string source_address_token; // An opaque proof of IP ownership. | 116 std::string source_address_token; // An opaque proof of IP ownership. |
| 114 std::string cert_sct; // Signed timestamp of the leaf cert. | 117 std::string cert_sct; // Signed timestamp of the leaf cert. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 virtual std::unique_ptr<QuicServerInfo> GetForServer( | 174 virtual std::unique_ptr<QuicServerInfo> GetForServer( |
| 172 const QuicServerId& server_id) = 0; | 175 const QuicServerId& server_id) = 0; |
| 173 | 176 |
| 174 private: | 177 private: |
| 175 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory); | 178 DISALLOW_COPY_AND_ASSIGN(QuicServerInfoFactory); |
| 176 }; | 179 }; |
| 177 | 180 |
| 178 } // namespace net | 181 } // namespace net |
| 179 | 182 |
| 180 #endif // NET_QUIC_CHROMIUM_QUIC_SERVER_INFO_H_ | 183 #endif // NET_QUIC_CHROMIUM_QUIC_SERVER_INFO_H_ |
| OLD | NEW |