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

Side by Side Diff: net/quic/chromium/quic_http_stream.h

Issue 2868633002: Create a QuicChromiumClientStream::Handle class for allowing a stream (Closed)
Patch Set: Rebase Created 3 years, 7 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
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_CHROMIUM_QUIC_HTTP_STREAM_H_ 5 #ifndef NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 6 #define NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void OnDataAvailable() override; 74 void OnDataAvailable() override;
75 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers, 75 void OnTrailingHeadersAvailable(const SpdyHeaderBlock& headers,
76 size_t frame_len) override; 76 size_t frame_len) override;
77 void OnClose() override; 77 void OnClose() override;
78 void OnError(int error) override; 78 void OnError(int error) override;
79 79
80 // QuicClientPushPromiseIndex::Delegate implementation 80 // QuicClientPushPromiseIndex::Delegate implementation
81 bool CheckVary(const SpdyHeaderBlock& client_request, 81 bool CheckVary(const SpdyHeaderBlock& client_request,
82 const SpdyHeaderBlock& promise_request, 82 const SpdyHeaderBlock& promise_request,
83 const SpdyHeaderBlock& promise_response) override; 83 const SpdyHeaderBlock& promise_response) override;
84 // TODO(rch): QuicClientPushPromiseIndex::Delegate is part of shared code.
85 // Figure out how to make the QuicHttpStream receive a Handle in this
86 // case instead of a QuicSpdyStream.
84 void OnRendezvousResult(QuicSpdyStream* stream) override; 87 void OnRendezvousResult(QuicSpdyStream* stream) override;
85 88
86 static HttpResponseInfo::ConnectionInfo ConnectionInfoFromQuicVersion( 89 static HttpResponseInfo::ConnectionInfo ConnectionInfoFromQuicVersion(
87 QuicVersion quic_version); 90 QuicVersion quic_version);
88 91
89 private: 92 private:
90 friend class test::QuicHttpStreamPeer; 93 friend class test::QuicHttpStreamPeer;
91 94
92 enum State { 95 enum State {
93 STATE_NONE, 96 STATE_NONE,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 148 }
146 149
147 const QuicChromiumClientSession::Handle* quic_session() const { 150 const QuicChromiumClientSession::Handle* quic_session() const {
148 return static_cast<const QuicChromiumClientSession::Handle*>(session()); 151 return static_cast<const QuicChromiumClientSession::Handle*>(session());
149 } 152 }
150 153
151 State next_state_; 154 State next_state_;
152 155
153 HttpServerProperties* http_server_properties_; // Unowned. 156 HttpServerProperties* http_server_properties_; // Unowned.
154 157
155 QuicChromiumClientStream* stream_; // Non-owning. 158 std::unique_ptr<QuicChromiumClientStream::Handle> stream_;
156 159
157 // The following three fields are all owned by the caller and must 160 // The following three fields are all owned by the caller and must
158 // outlive this object, according to the HttpStream contract. 161 // outlive this object, according to the HttpStream contract.
159 162
160 // The request to send. 163 // The request to send.
161 // Only valid before the response body is read. 164 // Only valid before the response body is read.
162 const HttpRequestInfo* request_info_; 165 const HttpRequestInfo* request_info_;
163 166
164 // The request body to send, if any, owned by the caller. 167 // The request body to send, if any, owned by the caller.
165 UploadDataStream* request_body_stream_; 168 UploadDataStream* request_body_stream_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 LoadTimingInfo::ConnectTiming connect_timing_; 231 LoadTimingInfo::ConnectTiming connect_timing_;
229 232
230 base::WeakPtrFactory<QuicHttpStream> weak_factory_; 233 base::WeakPtrFactory<QuicHttpStream> weak_factory_;
231 234
232 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream); 235 DISALLOW_COPY_AND_ASSIGN(QuicHttpStream);
233 }; 236 };
234 237
235 } // namespace net 238 } // namespace net
236 239
237 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_ 240 #endif // NET_QUIC_CHROMIUM_QUIC_HTTP_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/chromium/quic_http_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698