OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const QuicConfig& config, | 75 const QuicConfig& config, |
76 const QuicVersionVector& supported_versions); | 76 const QuicVersionVector& supported_versions); |
77 | 77 |
78 virtual ~QuicTestClient(); | 78 virtual ~QuicTestClient(); |
79 | 79 |
80 // ExpectCertificates controls whether the server is expected to provide | 80 // ExpectCertificates controls whether the server is expected to provide |
81 // certificates. The certificates, if any, are not verified, but the common | 81 // certificates. The certificates, if any, are not verified, but the common |
82 // name is recorded and available with |cert_common_name()|. | 82 // name is recorded and available with |cert_common_name()|. |
83 void ExpectCertificates(bool on); | 83 void ExpectCertificates(bool on); |
84 | 84 |
| 85 // Sets the |user_agent_id| of the |client_|. |
| 86 void SetUserAgentID(const string& user_agent_id); |
| 87 |
85 // Wraps data in a quic packet and sends it. | 88 // Wraps data in a quic packet and sends it. |
86 ssize_t SendData(string data, bool last_data); | 89 ssize_t SendData(string data, bool last_data); |
87 | 90 |
88 // From SimpleClient | 91 // From SimpleClient |
89 // Clears any outstanding state and sends a simple GET of 'uri' to the | 92 // Clears any outstanding state and sends a simple GET of 'uri' to the |
90 // server. Returns 0 if the request failed and no bytes were written. | 93 // server. Returns 0 if the request failed and no bytes were written. |
91 virtual ssize_t SendRequest(const string& uri) OVERRIDE; | 94 virtual ssize_t SendRequest(const string& uri) OVERRIDE; |
92 virtual ssize_t SendMessage(const HTTPMessage& message) OVERRIDE; | 95 virtual ssize_t SendMessage(const HTTPMessage& message) OVERRIDE; |
93 virtual string SendCustomSynchronousRequest( | 96 virtual string SendCustomSynchronousRequest( |
94 const HTTPMessage& message) OVERRIDE; | 97 const HTTPMessage& message) OVERRIDE; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 207 |
205 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 208 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
206 }; | 209 }; |
207 | 210 |
208 } // namespace test | 211 } // namespace test |
209 | 212 |
210 } // namespace tools | 213 } // namespace tools |
211 } // namespace net | 214 } // namespace net |
212 | 215 |
213 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 216 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |