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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void UseConnectionId(QuicConnectionId connection_id); 51 void UseConnectionId(QuicConnectionId connection_id);
52 52
53 private: 53 private:
54 QuicConnectionId override_connection_id_; // ConnectionId to use, if nonzero 54 QuicConnectionId override_connection_id_; // ConnectionId to use, if nonzero
55 QuicPacketWriterWrapper* test_writer_; 55 QuicPacketWriterWrapper* test_writer_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(MockableQuicClient); 57 DISALLOW_COPY_AND_ASSIGN(MockableQuicClient);
58 }; 58 };
59 59
60 // A toy QUIC client used for testing, mostly following the SimpleClient APIs. 60 // A toy QUIC client used for testing, mostly following the SimpleClient APIs.
61 class QuicTestClient : public SimpleClient, 61 class QuicTestClient : public SimpleClient, public QuicDataStream::Visitor {
62 public QuicDataStream::Visitor {
63 public: 62 public:
64 QuicTestClient(IPEndPoint server_address, 63 QuicTestClient(IPEndPoint server_address,
65 const string& server_hostname, 64 const string& server_hostname,
66 const QuicVersionVector& supported_versions); 65 const QuicVersionVector& supported_versions);
67 QuicTestClient(IPEndPoint server_address, 66 QuicTestClient(IPEndPoint server_address,
68 const string& server_hostname, 67 const string& server_hostname,
69 bool secure, 68 bool secure,
70 const QuicVersionVector& supported_versions); 69 const QuicVersionVector& supported_versions);
71 QuicTestClient(IPEndPoint server_address, 70 QuicTestClient(IPEndPoint server_address,
72 const string& server_hostname, 71 const string& server_hostname,
(...skipping 22 matching lines...) Expand all
95 virtual string SendCustomSynchronousRequest( 94 virtual string SendCustomSynchronousRequest(
96 const HTTPMessage& message) OVERRIDE; 95 const HTTPMessage& message) OVERRIDE;
97 virtual string SendSynchronousRequest(const string& uri) OVERRIDE; 96 virtual string SendSynchronousRequest(const string& uri) OVERRIDE;
98 virtual void Connect() OVERRIDE; 97 virtual void Connect() OVERRIDE;
99 virtual void ResetConnection() OVERRIDE; 98 virtual void ResetConnection() OVERRIDE;
100 virtual void Disconnect() OVERRIDE; 99 virtual void Disconnect() OVERRIDE;
101 virtual IPEndPoint LocalSocketAddress() const OVERRIDE; 100 virtual IPEndPoint LocalSocketAddress() const OVERRIDE;
102 virtual void ClearPerRequestState() OVERRIDE; 101 virtual void ClearPerRequestState() OVERRIDE;
103 virtual void WaitForResponseForMs(int timeout_ms) OVERRIDE; 102 virtual void WaitForResponseForMs(int timeout_ms) OVERRIDE;
104 virtual void WaitForInitialResponseForMs(int timeout_ms) OVERRIDE; 103 virtual void WaitForInitialResponseForMs(int timeout_ms) OVERRIDE;
105 virtual ssize_t Send(const void *buffer, size_t size) OVERRIDE; 104 virtual ssize_t Send(const void* buffer, size_t size) OVERRIDE;
106 virtual bool response_complete() const OVERRIDE; 105 virtual bool response_complete() const OVERRIDE;
107 virtual bool response_headers_complete() const OVERRIDE; 106 virtual bool response_headers_complete() const OVERRIDE;
108 virtual const BalsaHeaders* response_headers() const OVERRIDE; 107 virtual const BalsaHeaders* response_headers() const OVERRIDE;
109 virtual int64 response_size() const OVERRIDE; 108 virtual int64 response_size() const OVERRIDE;
110 virtual int response_header_size() const OVERRIDE; 109 virtual int response_header_size() const OVERRIDE;
111 virtual int64 response_body_size() const OVERRIDE; 110 virtual int64 response_body_size() const OVERRIDE;
112 virtual size_t bytes_read() const OVERRIDE; 111 virtual size_t bytes_read() const OVERRIDE;
113 virtual size_t bytes_written() const OVERRIDE; 112 virtual size_t bytes_written() const OVERRIDE;
114 virtual bool buffer_body() const OVERRIDE; 113 virtual bool buffer_body() const OVERRIDE;
115 virtual void set_buffer_body(bool buffer_body) OVERRIDE; 114 virtual void set_buffer_body(bool buffer_body) OVERRIDE;
116 virtual bool ServerInLameDuckMode() const OVERRIDE; 115 virtual bool ServerInLameDuckMode() const OVERRIDE;
117 virtual const string& response_body() OVERRIDE; 116 virtual const string& response_body() OVERRIDE;
118 virtual bool connected() const OVERRIDE; 117 virtual bool connected() const OVERRIDE;
119 // These functions are all unimplemented functions from SimpleClient, and log 118 // These functions are all unimplemented functions from SimpleClient, and log
120 // DFATAL if called by users of SimpleClient. 119 // DFATAL if called by users of SimpleClient.
121 virtual ssize_t SendAndWaitForResponse(const void *buffer, 120 virtual ssize_t SendAndWaitForResponse(const void* buffer,
122 size_t size) OVERRIDE; 121 size_t size) OVERRIDE;
123 virtual void Bind(IPEndPoint* local_address) OVERRIDE; 122 virtual void Bind(IPEndPoint* local_address) OVERRIDE;
124 virtual string SerializeMessage(const HTTPMessage& message) OVERRIDE; 123 virtual string SerializeMessage(const HTTPMessage& message) OVERRIDE;
125 virtual IPAddressNumber bind_to_address() const OVERRIDE; 124 virtual IPAddressNumber bind_to_address() const OVERRIDE;
126 virtual void set_bind_to_address(IPAddressNumber address) OVERRIDE; 125 virtual void set_bind_to_address(IPAddressNumber address) OVERRIDE;
127 virtual const IPEndPoint& address() const OVERRIDE; 126 virtual const IPEndPoint& address() const OVERRIDE;
128 virtual size_t requests_sent() const OVERRIDE; 127 virtual size_t requests_sent() const OVERRIDE;
129 128
130 // From QuicDataStream::Visitor 129 // From QuicDataStream::Visitor
131 virtual void OnClose(QuicDataStream* stream) OVERRIDE; 130 virtual void OnClose(QuicDataStream* stream) OVERRIDE;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 197
199 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); 198 DISALLOW_COPY_AND_ASSIGN(QuicTestClient);
200 }; 199 };
201 200
202 } // namespace test 201 } // namespace test
203 202
204 } // namespace tools 203 } // namespace tools
205 } // namespace net 204 } // namespace net
206 205
207 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 206 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698