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

Side by Side Diff: net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 | « net/proxy/proxy_service_v8.cc ('k') | net/quic/chromium/crypto_test_utils_chromium.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "net/quic/chromium/bidirectional_stream_quic_impl.h" 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const char kDefaultServerHostName[] = "www.google.com"; 54 const char kDefaultServerHostName[] = "www.google.com";
55 const uint16_t kDefaultServerPort = 80; 55 const uint16_t kDefaultServerPort = 80;
56 // Size of the buffer to be allocated for each read. 56 // Size of the buffer to be allocated for each read.
57 const size_t kReadBufferSize = 4096; 57 const size_t kReadBufferSize = 4096;
58 58
59 class TestDelegateBase : public BidirectionalStreamImpl::Delegate { 59 class TestDelegateBase : public BidirectionalStreamImpl::Delegate {
60 public: 60 public:
61 TestDelegateBase(IOBuffer* read_buf, int read_buf_len) 61 TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
62 : TestDelegateBase(read_buf, 62 : TestDelegateBase(read_buf,
63 read_buf_len, 63 read_buf_len,
64 base::WrapUnique(new base::Timer(false, false))) {} 64 base::MakeUnique<base::Timer>(false, false)) {}
65 65
66 TestDelegateBase(IOBuffer* read_buf, 66 TestDelegateBase(IOBuffer* read_buf,
67 int read_buf_len, 67 int read_buf_len,
68 std::unique_ptr<base::Timer> timer) 68 std::unique_ptr<base::Timer> timer)
69 : read_buf_(read_buf), 69 : read_buf_(read_buf),
70 read_buf_len_(read_buf_len), 70 read_buf_len_(read_buf_len),
71 timer_(std::move(timer)), 71 timer_(std::move(timer)),
72 loop_(nullptr), 72 loop_(nullptr),
73 next_proto_(kProtoUnknown), 73 next_proto_(kProtoUnknown),
74 received_bytes_(0), 74 received_bytes_(0),
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 1629
1630 base::RunLoop().RunUntilIdle(); 1630 base::RunLoop().RunUntilIdle();
1631 1631
1632 EXPECT_EQ(1, delegate->on_data_read_count()); 1632 EXPECT_EQ(1, delegate->on_data_read_count());
1633 EXPECT_EQ(0, delegate->on_data_sent_count()); 1633 EXPECT_EQ(0, delegate->on_data_sent_count());
1634 } 1634 }
1635 1635
1636 } // namespace test 1636 } // namespace test
1637 1637
1638 } // namespace net 1638 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service_v8.cc ('k') | net/quic/chromium/crypto_test_utils_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698