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

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

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 6 #define NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
7 7
8 #include <stddef.h> 8 #include <stddef.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/core/quic_protocol.h" 13 #include "net/quic/core/quic_packets.h"
14 #include "net/quic/core/quic_spdy_stream.h" 14 #include "net/quic/core/quic_spdy_stream.h"
15 #include "net/spdy/spdy_framer.h" 15 #include "net/spdy/spdy_framer.h"
16 #include "net/tools/quic/quic_in_memory_cache.h" 16 #include "net/tools/quic/quic_http_response_cache.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 20
21 namespace test { 21 namespace test {
22 class QuicSimpleServerStreamPeer; 22 class QuicSimpleServerStreamPeer;
23 } // namespace test 23 } // namespace test
24 24
25 // All this does right now is aggregate data, and on fin, send an HTTP 25 // All this does right now is aggregate data, and on fin, send an HTTP
26 // response. 26 // response.
27 class QuicSimpleServerStream : public QuicSpdyStream { 27 class QuicSimpleServerStream : public QuicSpdyStream {
28 public: 28 public:
29 QuicSimpleServerStream(QuicStreamId id, 29 QuicSimpleServerStream(QuicStreamId id,
30 QuicSpdySession* session, 30 QuicSpdySession* session,
31 QuicInMemoryCache* in_memory_cache); 31 QuicHttpResponseCache* response_cache);
32 ~QuicSimpleServerStream() override; 32 ~QuicSimpleServerStream() override;
33 33
34 // QuicSpdyStream 34 // QuicSpdyStream
35 void OnInitialHeadersComplete(bool fin, 35 void OnInitialHeadersComplete(bool fin,
36 size_t frame_len, 36 size_t frame_len,
37 const QuicHeaderList& header_list) override; 37 const QuicHeaderList& header_list) override;
38 void OnTrailingHeadersComplete(bool fin, 38 void OnTrailingHeadersComplete(bool fin,
39 size_t frame_len, 39 size_t frame_len,
40 const QuicHeaderList& header_list) override; 40 const QuicHeaderList& header_list) override;
41 41
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const std::string& body() { return body_; } 76 const std::string& body() { return body_; }
77 77
78 private: 78 private:
79 friend class test::QuicSimpleServerStreamPeer; 79 friend class test::QuicSimpleServerStreamPeer;
80 80
81 // The parsed headers received from the client. 81 // The parsed headers received from the client.
82 SpdyHeaderBlock request_headers_; 82 SpdyHeaderBlock request_headers_;
83 int64_t content_length_; 83 int64_t content_length_;
84 std::string body_; 84 std::string body_;
85 85
86 QuicInMemoryCache* in_memory_cache_; // Not owned. 86 QuicHttpResponseCache* response_cache_; // Not owned.
87 87
88 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream); 88 DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream);
89 }; 89 };
90 90
91 } // namespace net 91 } // namespace net
92 92
93 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_ 93 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_SERVER_STREAM_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_session_test.cc ('k') | net/tools/quic/quic_simple_server_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698