OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_QUIC_CRYPTO_SERVER_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ |
6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ | 6 #define NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual void SendServerConfigUpdate( | 75 virtual void SendServerConfigUpdate( |
76 const CachedNetworkParameters* cached_network_params); | 76 const CachedNetworkParameters* cached_network_params); |
77 | 77 |
78 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the | 78 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the |
79 // client. | 79 // client. |
80 void OnServerHelloAcked(); | 80 void OnServerHelloAcked(); |
81 | 81 |
82 void set_previous_cached_network_params( | 82 void set_previous_cached_network_params( |
83 CachedNetworkParameters cached_network_params); | 83 CachedNetworkParameters cached_network_params); |
84 | 84 |
| 85 const CachedNetworkParameters* previous_cached_network_params() const; |
| 86 |
85 protected: | 87 protected: |
86 virtual QuicErrorCode ProcessClientHello( | 88 virtual QuicErrorCode ProcessClientHello( |
87 const CryptoHandshakeMessage& message, | 89 const CryptoHandshakeMessage& message, |
88 const ValidateClientHelloResultCallback::Result& result, | 90 const ValidateClientHelloResultCallback::Result& result, |
89 CryptoHandshakeMessage* reply, | 91 CryptoHandshakeMessage* reply, |
90 std::string* error_details); | 92 std::string* error_details); |
91 | 93 |
92 // Hook that allows the server to set QuicConfig defaults just | 94 // Hook that allows the server to set QuicConfig defaults just |
93 // before going through the parameter negotiation step. | 95 // before going through the parameter negotiation step. |
94 virtual void OverrideQuicConfigDefaults(QuicConfig* config); | 96 virtual void OverrideQuicConfigDefaults(QuicConfig* config); |
95 | 97 |
96 CachedNetworkParameters* get_previous_cached_network_params(); | |
97 | |
98 private: | 98 private: |
99 friend class test::CryptoTestUtils; | 99 friend class test::CryptoTestUtils; |
100 | 100 |
101 class ValidateCallback : public ValidateClientHelloResultCallback { | 101 class ValidateCallback : public ValidateClientHelloResultCallback { |
102 public: | 102 public: |
103 explicit ValidateCallback(QuicCryptoServerStream* parent); | 103 explicit ValidateCallback(QuicCryptoServerStream* parent); |
104 // To allow the parent to detach itself from the callback before deletion. | 104 // To allow the parent to detach itself from the callback before deletion. |
105 void Cancel(); | 105 void Cancel(); |
106 | 106 |
107 // From ValidateClientHelloResultCallback | 107 // From ValidateClientHelloResultCallback |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // store here, and send back in future STKs if we have no better bandwidth | 140 // store here, and send back in future STKs if we have no better bandwidth |
141 // estimate to send. | 141 // estimate to send. |
142 scoped_ptr<CachedNetworkParameters> previous_cached_network_params_; | 142 scoped_ptr<CachedNetworkParameters> previous_cached_network_params_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream); | 144 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream); |
145 }; | 145 }; |
146 | 146 |
147 } // namespace net | 147 } // namespace net |
148 | 148 |
149 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ | 149 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ |
OLD | NEW |