Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: net/quic/quic_crypto_server_stream.h

Issue 666003002: Added helper methods to get/set previous_cached_network_params_. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Fix_test_which_times_out_77868811
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // |on_handshake_complete| is true when this is called immediately after 77 // |on_handshake_complete| is true when this is called immediately after
78 // handshake completes, and should be false for subsequent updates. 78 // handshake completes, and should be false for subsequent updates.
79 virtual void SendServerConfigUpdate( 79 virtual void SendServerConfigUpdate(
80 const CachedNetworkParameters* cached_network_params, 80 const CachedNetworkParameters* cached_network_params,
81 bool on_handshake_complete); 81 bool on_handshake_complete);
82 82
83 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the 83 // Called by the ServerHello AckNotifier once the SHLO has been ACKed by the
84 // client. 84 // client.
85 void OnServerHelloAcked(); 85 void OnServerHelloAcked();
86 86
87 void set_previous_cached_network_params(
88 CachedNetworkParameters cached_network_params);
89
87 protected: 90 protected:
88 virtual QuicErrorCode ProcessClientHello( 91 virtual QuicErrorCode ProcessClientHello(
89 const CryptoHandshakeMessage& message, 92 const CryptoHandshakeMessage& message,
90 const ValidateClientHelloResultCallback::Result& result, 93 const ValidateClientHelloResultCallback::Result& result,
91 CryptoHandshakeMessage* reply, 94 CryptoHandshakeMessage* reply,
92 std::string* error_details); 95 std::string* error_details);
93 96
94 // Hook that allows the server to set QuicConfig defaults just 97 // Hook that allows the server to set QuicConfig defaults just
95 // before going through the parameter negotiation step. 98 // before going through the parameter negotiation step.
96 virtual void OverrideQuicConfigDefaults(QuicConfig* config); 99 virtual void OverrideQuicConfigDefaults(QuicConfig* config);
97 100
101 CachedNetworkParameters* get_previous_cached_network_params();
102
98 private: 103 private:
99 friend class test::CryptoTestUtils; 104 friend class test::CryptoTestUtils;
100 105
101 class ValidateCallback : public ValidateClientHelloResultCallback { 106 class ValidateCallback : public ValidateClientHelloResultCallback {
102 public: 107 public:
103 explicit ValidateCallback(QuicCryptoServerStream* parent); 108 explicit ValidateCallback(QuicCryptoServerStream* parent);
104 // To allow the parent to detach itself from the callback before deletion. 109 // To allow the parent to detach itself from the callback before deletion.
105 void Cancel(); 110 void Cancel();
106 111
107 // From ValidateClientHelloResultCallback 112 // From ValidateClientHelloResultCallback
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // store here, and send back in future STKs if we have no better bandwidth 145 // store here, and send back in future STKs if we have no better bandwidth
141 // estimate to send. 146 // estimate to send.
142 scoped_ptr<CachedNetworkParameters> previous_cached_network_params_; 147 scoped_ptr<CachedNetworkParameters> previous_cached_network_params_;
143 148
144 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream); 149 DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
145 }; 150 };
146 151
147 } // namespace net 152 } // namespace net
148 153
149 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_ 154 #endif // NET_QUIC_QUIC_CRYPTO_SERVER_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_crypto_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698