OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "blimp/net/stream_socket_connection.h" | |
6 | |
7 #include <utility> | |
8 | |
9 #include "base/memory/ptr_util.h" | |
10 #include "blimp/net/compressed_packet_reader.h" | |
11 #include "blimp/net/compressed_packet_writer.h" | |
12 #include "blimp/net/stream_packet_reader.h" | |
13 #include "blimp/net/stream_packet_writer.h" | |
14 | |
15 namespace blimp { | |
16 | |
17 StreamSocketConnection::StreamSocketConnection( | |
18 std::unique_ptr<net::StreamSocket> socket) | |
19 : BlimpConnection(base::MakeUnique<CompressedPacketReader>( | |
20 base::MakeUnique<StreamPacketReader>(socket.get())), | |
21 base::MakeUnique<CompressedPacketWriter>( | |
22 base::MakeUnique<StreamPacketWriter>(socket.get()))), | |
23 socket_(std::move(socket)) { | |
24 DCHECK(socket_); | |
25 } | |
26 | |
27 StreamSocketConnection::~StreamSocketConnection() {} | |
28 | |
29 } // namespace blimp | |
OLD | NEW |