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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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 | Annotate | Revision Log
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_client.h" 5 #include "net/tools/quic/test_tools/quic_test_client.h"
6 6
7 #include "net/tools/flip_server/balsa_headers.h" 7 #include "net/tools/flip_server/balsa_headers.h"
8 #include "net/tools/quic/test_tools/http_message_test_utils.h" 8 #include "net/tools/quic/test_tools/http_message_test_utils.h"
9 9
10 using std::string; 10 using std::string;
(...skipping 27 matching lines...) Expand all
38 : server_address_(address), 38 : server_address_(address),
39 client_(address, hostname), 39 client_(address, hostname),
40 stream_(NULL), 40 stream_(NULL),
41 stream_error_(QUIC_STREAM_NO_ERROR), 41 stream_error_(QUIC_STREAM_NO_ERROR),
42 connection_error_(QUIC_NO_ERROR), 42 connection_error_(QUIC_NO_ERROR),
43 bytes_read_(0), 43 bytes_read_(0),
44 bytes_written_(0), 44 bytes_written_(0),
45 never_connected_(true) { 45 never_connected_(true) {
46 } 46 }
47 47
48 QuicTestClient::QuicTestClient(IPEndPoint address,
49 const string& hostname,
50 const QuicConfig& config)
51 : server_address_(address),
52 client_(address, hostname, config),
53 stream_(NULL),
54 stream_error_(QUIC_STREAM_NO_ERROR),
55 connection_error_(QUIC_NO_ERROR),
56 bytes_read_(0),
57 bytes_written_(0),
58 never_connected_(true) {
59 }
60
48 QuicTestClient::~QuicTestClient() { 61 QuicTestClient::~QuicTestClient() {
49 if (stream_) { 62 if (stream_) {
50 stream_->set_visitor(NULL); 63 stream_->set_visitor(NULL);
51 } 64 }
52 } 65 }
53 66
54 ssize_t QuicTestClient::SendRequest(const string& uri) { 67 ssize_t QuicTestClient::SendRequest(const string& uri) {
55 HTTPMessage message(HttpConstants::HTTP_1_1, HttpConstants::GET, uri); 68 HTTPMessage message(HttpConstants::HTTP_1_1, HttpConstants::GET, uri);
56 return SendMessage(message); 69 return SendMessage(message);
57 } 70 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 stream_error_ = stream_->stream_error(); 187 stream_error_ = stream_->stream_error();
175 connection_error_ = stream_->connection_error(); 188 connection_error_ = stream_->connection_error();
176 bytes_read_ = stream_->stream_bytes_read(); 189 bytes_read_ = stream_->stream_bytes_read();
177 bytes_written_ = stream_->stream_bytes_written(); 190 bytes_written_ = stream_->stream_bytes_written();
178 stream_ = NULL; 191 stream_ = NULL;
179 } 192 }
180 193
181 } // namespace test 194 } // namespace test
182 } // namespace tools 195 } // namespace tools
183 } // namespace net 196 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_test_client.h ('k') | net/tools/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698