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

Side by Side Diff: net/tools/quic/quic_client_session.h

Issue 1572013002: relnote: QUIC header streams support to receive PUSH_PROMISE. Protected by --quic_supports_push_pr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14_CL_111507546
Patch Set: Created 4 years, 11 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 | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | 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 // A client specific QuicSession subclass. 5 // A client specific QuicSession subclass.
6 6
7 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ 7 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_
8 #define NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ 8 #define NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "net/quic/quic_client_session_base.h" 13 #include "net/quic/quic_client_session_base.h"
14 #include "net/quic/quic_crypto_client_stream.h" 14 #include "net/quic/quic_crypto_client_stream.h"
15 #include "net/quic/quic_protocol.h" 15 #include "net/quic/quic_protocol.h"
16 #include "net/tools/quic/quic_spdy_client_stream.h" 16 #include "net/tools/quic/quic_spdy_client_stream.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 class QuicConnection; 20 class QuicConnection;
21 class QuicServerId; 21 class QuicServerId;
22 class ReliableQuicStream; 22 class ReliableQuicStream;
23 23
24 namespace tools { 24 namespace tools {
25 25
26 // The maximum time a promises stream can be reserved without being
27 // claimed by a client request.
28 const int64_t kPushPromiseTimeoutSecs = 60;
29
26 class QuicClientSession : public QuicClientSessionBase { 30 class QuicClientSession : public QuicClientSessionBase {
27 public: 31 public:
28 QuicClientSession(const QuicConfig& config, 32 QuicClientSession(const QuicConfig& config,
29 QuicConnection* connection, 33 QuicConnection* connection,
30 const QuicServerId& server_id, 34 const QuicServerId& server_id,
31 QuicCryptoClientConfig* crypto_config); 35 QuicCryptoClientConfig* crypto_config);
32 ~QuicClientSession() override; 36 ~QuicClientSession() override;
33 // Set up the QuicClientSession. Must be called prior to use. 37 // Set up the QuicClientSession. Must be called prior to use.
34 void Initialize() override; 38 void Initialize() override;
35 39
(...skipping 29 matching lines...) Expand all
65 // Unlike CreateOutgoingDynamicStream, which applies a bunch of sanity checks, 69 // Unlike CreateOutgoingDynamicStream, which applies a bunch of sanity checks,
66 // this simply returns a new QuicSpdyClientStream. This may be used by 70 // this simply returns a new QuicSpdyClientStream. This may be used by
67 // subclasses which want to use a subclass of QuicSpdyClientStream for streams 71 // subclasses which want to use a subclass of QuicSpdyClientStream for streams
68 // but wish to use the sanity checks in CreateOutgoingDynamicStream. 72 // but wish to use the sanity checks in CreateOutgoingDynamicStream.
69 virtual QuicSpdyClientStream* CreateClientStream(); 73 virtual QuicSpdyClientStream* CreateClientStream();
70 74
71 const QuicServerId& server_id() { return server_id_; } 75 const QuicServerId& server_id() { return server_id_; }
72 QuicCryptoClientConfig* crypto_config() { return crypto_config_; } 76 QuicCryptoClientConfig* crypto_config() { return crypto_config_; }
73 77
74 private: 78 private:
79 bool ShouldCreateIncomingDynamicStream(QuicStreamId id);
75 scoped_ptr<QuicCryptoClientStreamBase> crypto_stream_; 80 scoped_ptr<QuicCryptoClientStreamBase> crypto_stream_;
76 QuicServerId server_id_; 81 QuicServerId server_id_;
77 QuicCryptoClientConfig* crypto_config_; 82 QuicCryptoClientConfig* crypto_config_;
78 83
79 // If this is set to false, the client will ignore server GOAWAYs and allow 84 // If this is set to false, the client will ignore server GOAWAYs and allow
80 // the creation of streams regardless of the high chance they will fail. 85 // the creation of streams regardless of the high chance they will fail.
81 bool respect_goaway_; 86 bool respect_goaway_;
82 87
83 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 88 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
84 }; 89 };
85 90
86 } // namespace tools 91 } // namespace tools
87 } // namespace net 92 } // namespace net
88 93
89 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_ 94 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698