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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.cc

Issue 102313005: Remove the is_server argument from the QuicSession constructor. (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/tools/quic/quic_spdy_server_stream_test.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 (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/tools/quic/test_tools/quic_test_utils.h" 5 #include "net/tools/quic/test_tools/quic_test_utils.h"
6 6
7 #include "base/sha1.h" 7 #include "base/sha1.h"
8 #include "net/quic/quic_connection.h" 8 #include "net/quic/quic_connection.h"
9 #include "net/quic/test_tools/quic_connection_peer.h" 9 #include "net/quic/test_tools/quic_connection_peer.h"
10 #include "net/quic/test_tools/quic_test_utils.h" 10 #include "net/quic/test_tools/quic_test_utils.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 uint64 SimpleRandom::RandUint64() { 58 uint64 SimpleRandom::RandUint64() {
59 unsigned char hash[base::kSHA1Length]; 59 unsigned char hash[base::kSHA1Length];
60 base::SHA1HashBytes(reinterpret_cast<unsigned char*>(&seed_), sizeof(seed_), 60 base::SHA1HashBytes(reinterpret_cast<unsigned char*>(&seed_), sizeof(seed_),
61 hash); 61 hash);
62 memcpy(&seed_, hash, sizeof(seed_)); 62 memcpy(&seed_, hash, sizeof(seed_));
63 return seed_; 63 return seed_;
64 } 64 }
65 65
66 TestSession::TestSession(QuicConnection* connection, 66 TestSession::TestSession(QuicConnection* connection,
67 const QuicConfig& config) 67 const QuicConfig& config)
68 : QuicSession(connection, config, connection->is_server()), 68 : QuicSession(connection, config),
69 crypto_stream_(NULL) { 69 crypto_stream_(NULL) {
70 } 70 }
71 71
72 TestSession::~TestSession() {} 72 TestSession::~TestSession() {}
73 73
74 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { 74 void TestSession::SetCryptoStream(QuicCryptoStream* stream) {
75 crypto_stream_ = stream; 75 crypto_stream_ = stream;
76 } 76 }
77 77
78 QuicCryptoStream* TestSession::GetCryptoStream() { 78 QuicCryptoStream* TestSession::GetCryptoStream() {
(...skipping 23 matching lines...) Expand all
102 102
103 MockAckNotifierDelegate::MockAckNotifierDelegate() { 103 MockAckNotifierDelegate::MockAckNotifierDelegate() {
104 } 104 }
105 105
106 MockAckNotifierDelegate::~MockAckNotifierDelegate() { 106 MockAckNotifierDelegate::~MockAckNotifierDelegate() {
107 } 107 }
108 108
109 } // namespace test 109 } // namespace test
110 } // namespace tools 110 } // namespace tools
111 } // namespace net 111 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_server_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698