OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "blimp/net/stream_socket_connection.h" | 5 #include "blimp/net/stream_socket_connection.h" |
6 | 6 |
| 7 #include "blimp/net/compressed_packet_reader.h" |
| 8 #include "blimp/net/compressed_packet_writer.h" |
7 #include "blimp/net/stream_packet_reader.h" | 9 #include "blimp/net/stream_packet_reader.h" |
8 #include "blimp/net/stream_packet_writer.h" | 10 #include "blimp/net/stream_packet_writer.h" |
9 | 11 |
10 namespace blimp { | 12 namespace blimp { |
11 | 13 |
12 StreamSocketConnection::StreamSocketConnection( | 14 StreamSocketConnection::StreamSocketConnection( |
13 scoped_ptr<net::StreamSocket> socket) | 15 scoped_ptr<net::StreamSocket> socket) |
14 : BlimpConnection(make_scoped_ptr(new StreamPacketReader(socket.get())), | 16 : BlimpConnection( |
15 make_scoped_ptr(new StreamPacketWriter(socket.get()))), | 17 make_scoped_ptr(new CompressedPacketReader( |
| 18 make_scoped_ptr(new StreamPacketReader(socket.get())))), |
| 19 make_scoped_ptr(new CompressedPacketWriter( |
| 20 make_scoped_ptr(new StreamPacketWriter(socket.get()))))), |
16 socket_(std::move(socket)) { | 21 socket_(std::move(socket)) { |
17 DCHECK(socket_); | 22 DCHECK(socket_); |
18 } | 23 } |
19 | 24 |
20 StreamSocketConnection::~StreamSocketConnection() {} | 25 StreamSocketConnection::~StreamSocketConnection() {} |
21 | 26 |
22 } // namespace blimp | 27 } // namespace blimp |
OLD | NEW |