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_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 6 #define NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
| 12 #include <memory> |
12 #include <string> | 13 #include <string> |
13 #include <vector> | 14 #include <vector> |
14 | 15 |
15 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "net/spdy/buffered_spdy_framer.h" | 17 #include "net/spdy/buffered_spdy_framer.h" |
18 #include "net/spdy/spdy_protocol.h" | 18 #include "net/spdy/spdy_protocol.h" |
19 #include "net/tools/balsa/balsa_headers.h" | 19 #include "net/tools/balsa/balsa_headers.h" |
20 #include "net/tools/balsa/balsa_visitor_interface.h" | 20 #include "net/tools/balsa/balsa_visitor_interface.h" |
21 #include "net/tools/flip_server/output_ordering.h" | 21 #include "net/tools/flip_server/output_ordering.h" |
22 #include "net/tools/flip_server/sm_connection.h" | 22 #include "net/tools/flip_server/sm_connection.h" |
23 #include "net/tools/flip_server/sm_interface.h" | 23 #include "net/tools/flip_server/sm_interface.h" |
24 | 24 |
25 namespace net { | 25 namespace net { |
26 | 26 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 size_t SendSynReplyImpl(uint32_t stream_id, const BalsaHeaders& headers); | 211 size_t SendSynReplyImpl(uint32_t stream_id, const BalsaHeaders& headers); |
212 void SendDataFrameImpl(uint32_t stream_id, | 212 void SendDataFrameImpl(uint32_t stream_id, |
213 const char* data, | 213 const char* data, |
214 int64_t len, | 214 int64_t len, |
215 SpdyDataFlags flags, | 215 SpdyDataFlags flags, |
216 bool compress); | 216 bool compress); |
217 void EnqueueDataFrame(DataFrame* df); | 217 void EnqueueDataFrame(DataFrame* df); |
218 void GetOutput() override; | 218 void GetOutput() override; |
219 | 219 |
220 private: | 220 private: |
221 scoped_ptr<BufferedSpdyFramer> buffered_spdy_framer_; | 221 std::unique_ptr<BufferedSpdyFramer> buffered_spdy_framer_; |
222 bool valid_spdy_session_; // True if we have seen valid data on this session. | 222 bool valid_spdy_session_; // True if we have seen valid data on this session. |
223 // Use this to fail fast when junk is sent to our | 223 // Use this to fail fast when junk is sent to our |
224 // port. | 224 // port. |
225 | 225 |
226 SMConnection* connection_; | 226 SMConnection* connection_; |
227 OutputList* client_output_list_; | 227 OutputList* client_output_list_; |
228 OutputOrdering client_output_ordering_; | 228 OutputOrdering client_output_ordering_; |
229 uint32_t next_outgoing_stream_id_; | 229 uint32_t next_outgoing_stream_id_; |
230 EpollServer* epoll_server_; | 230 EpollServer* epoll_server_; |
231 FlipAcceptor* acceptor_; | 231 FlipAcceptor* acceptor_; |
232 MemoryCache* memory_cache_; | 232 MemoryCache* memory_cache_; |
233 std::vector<SMInterface*> server_interface_list; | 233 std::vector<SMInterface*> server_interface_list; |
234 std::vector<int32_t> unused_server_interface_list; | 234 std::vector<int32_t> unused_server_interface_list; |
235 typedef std::map<uint32_t, SMInterface*> StreamToSmif; | 235 typedef std::map<uint32_t, SMInterface*> StreamToSmif; |
236 StreamToSmif stream_to_smif_; | 236 StreamToSmif stream_to_smif_; |
237 bool close_on_error_; | 237 bool close_on_error_; |
238 | 238 |
239 static std::string forward_ip_header_; | 239 static std::string forward_ip_header_; |
240 }; | 240 }; |
241 | 241 |
242 } // namespace net | 242 } // namespace net |
243 | 243 |
244 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ | 244 #endif // NET_TOOLS_FLIP_SERVER_SPDY_INTERFACE_H_ |
OLD | NEW |