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

Side by Side Diff: blimp/net/stream_socket_connection.cc

Issue 2253513004: Fix off-by-one error in counter array sizing in BlimpStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spaces around plus Created 4 years, 4 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
« no previous file with comments | « blimp/net/blimp_stats.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "blimp/net/compressed_packet_reader.h" 10 #include "blimp/net/compressed_packet_reader.h"
11 #include "blimp/net/compressed_packet_writer.h" 11 #include "blimp/net/compressed_packet_writer.h"
12 #include "blimp/net/stream_packet_reader.h" 12 #include "blimp/net/stream_packet_reader.h"
13 #include "blimp/net/stream_packet_writer.h" 13 #include "blimp/net/stream_packet_writer.h"
14 14
15 namespace blimp { 15 namespace blimp {
16 16
17 // TODO(kmarshall): Re-enable CompressedPacket(Reader|Writer)
18 // after zlib bug in crbug.com/r637376 is resolved.
19 StreamSocketConnection::StreamSocketConnection( 17 StreamSocketConnection::StreamSocketConnection(
20 std::unique_ptr<net::StreamSocket> socket) 18 std::unique_ptr<net::StreamSocket> socket)
21 : BlimpConnection(base::MakeUnique<StreamPacketReader>(socket.get()), 19 : BlimpConnection(base::MakeUnique<CompressedPacketReader>(
22 base::MakeUnique<StreamPacketWriter>(socket.get())), 20 base::MakeUnique<StreamPacketReader>(socket.get())),
21 base::MakeUnique<CompressedPacketWriter>(
22 base::MakeUnique<StreamPacketWriter>(socket.get()))),
23 socket_(std::move(socket)) { 23 socket_(std::move(socket)) {
24 DCHECK(socket_); 24 DCHECK(socket_);
25 } 25 }
26 26
27 StreamSocketConnection::~StreamSocketConnection() {} 27 StreamSocketConnection::~StreamSocketConnection() {}
28 28
29 } // namespace blimp 29 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/blimp_stats.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698