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

Side by Side Diff: net/quic/quic_http_stream_test.cc

Issue 109323006: Pool 64 bits of entropy instead of calling OpenSSL's RNG for one bit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_network_transaction_unittest.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 (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 #include "net/quic/quic_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 : mode(mode), 126 : mode(mode),
127 packet(packet) { 127 packet(packet) {
128 } 128 }
129 IoMode mode; 129 IoMode mode;
130 QuicEncryptedPacket* packet; 130 QuicEncryptedPacket* packet;
131 }; 131 };
132 132
133 QuicHttpStreamTest() 133 QuicHttpStreamTest()
134 : net_log_(BoundNetLog()), 134 : net_log_(BoundNetLog()),
135 use_closing_stream_(false), 135 use_closing_stream_(false),
136 random_generator_(0),
Ryan Hamilton 2013/12/12 22:43:33 Do we need 2 MockRandoms?
ramant (doing other things) 2013/12/12 22:53:47 Done.
ramant (doing other things) 2013/12/12 23:00:11 I wasn't sure when I did the merge. Tested the cod
136 read_buffer_(new IOBufferWithSize(4096)), 137 read_buffer_(new IOBufferWithSize(4096)),
137 guid_(2), 138 guid_(2),
138 framer_(QuicSupportedVersions(), QuicTime::Zero(), false), 139 framer_(QuicSupportedVersions(), QuicTime::Zero(), false),
140 random_(0),
139 creator_(guid_, &framer_, &random_, false) { 141 creator_(guid_, &framer_, &random_, false) {
140 IPAddressNumber ip; 142 IPAddressNumber ip;
141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); 143 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip));
142 peer_addr_ = IPEndPoint(ip, 443); 144 peer_addr_ = IPEndPoint(ip, 443);
143 self_addr_ = IPEndPoint(ip, 8435); 145 self_addr_ = IPEndPoint(ip, 8435);
144 } 146 }
145 147
146 ~QuicHttpStreamTest() { 148 ~QuicHttpStreamTest() {
147 session_->CloseSessionOnError(ERR_ABORTED); 149 session_->CloseSessionOnError(ERR_ABORTED);
148 for (size_t i = 0; i < writes_.size(); i++) { 150 for (size_t i = 0; i < writes_.size(); i++) {
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 758
757 // Data should flush out now. 759 // Data should flush out now.
758 connection_->OnCanWrite(); 760 connection_->OnCanWrite();
759 EXPECT_FALSE(reliable_stream->HasBufferedData()); 761 EXPECT_FALSE(reliable_stream->HasBufferedData());
760 EXPECT_TRUE(AtEof()); 762 EXPECT_TRUE(AtEof());
761 } 763 }
762 764
763 } // namespace test 765 } // namespace test
764 766
765 } // namespace net 767 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698