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

Side by Side Diff: net/tools/quic/quic_client.h

Issue 763833003: Remove using namespace in net/quic/quic_stream_sequencer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 // A toy client, which connects to a specified port and sends QUIC 5 // A toy client, which connects to a specified port and sends QUIC
6 // request to that endpoint. 6 // request to that endpoint.
7 7
8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_
9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 class QuicClient : public EpollCallbackInterface, 38 class QuicClient : public EpollCallbackInterface,
39 public QuicDataStream::Visitor { 39 public QuicDataStream::Visitor {
40 public: 40 public:
41 class ResponseListener { 41 class ResponseListener {
42 public: 42 public:
43 ResponseListener() {} 43 ResponseListener() {}
44 virtual ~ResponseListener() {} 44 virtual ~ResponseListener() {}
45 virtual void OnCompleteResponse(QuicStreamId id, 45 virtual void OnCompleteResponse(QuicStreamId id,
46 const BalsaHeaders& response_headers, 46 const BalsaHeaders& response_headers,
47 const string& response_body) = 0; 47 const std::string& response_body) = 0;
48 }; 48 };
49 49
50 // Create a quic client, which will have events managed by an externally owned 50 // Create a quic client, which will have events managed by an externally owned
51 // EpollServer. 51 // EpollServer.
52 QuicClient(IPEndPoint server_address, 52 QuicClient(IPEndPoint server_address,
53 const QuicServerId& server_id, 53 const QuicServerId& server_id,
54 const QuicVersionVector& supported_versions, 54 const QuicVersionVector& supported_versions,
55 bool print_response, 55 bool print_response,
56 EpollServer* epoll_server); 56 EpollServer* epoll_server);
57 QuicClient(IPEndPoint server_address, 57 QuicClient(IPEndPoint server_address,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 int fd() { return fd_; } 136 int fd() { return fd_; }
137 137
138 const QuicServerId& server_id() const { return server_id_; } 138 const QuicServerId& server_id() const { return server_id_; }
139 139
140 // This should only be set before the initial Connect() 140 // This should only be set before the initial Connect()
141 void set_server_id(const QuicServerId& server_id) { 141 void set_server_id(const QuicServerId& server_id) {
142 server_id_ = server_id; 142 server_id_ = server_id;
143 } 143 }
144 144
145 void SetUserAgentID(const string& user_agent_id) { 145 void SetUserAgentID(const std::string& user_agent_id) {
146 crypto_config_.set_user_agent_id(user_agent_id); 146 crypto_config_.set_user_agent_id(user_agent_id);
147 } 147 }
148 148
149 // SetProofVerifier sets the ProofVerifier that will be used to verify the 149 // SetProofVerifier sets the ProofVerifier that will be used to verify the
150 // server's certificate and takes ownership of |verifier|. 150 // server's certificate and takes ownership of |verifier|.
151 void SetProofVerifier(ProofVerifier* verifier) { 151 void SetProofVerifier(ProofVerifier* verifier) {
152 // TODO(rtenneti): We should set ProofVerifier in QuicClientSession. 152 // TODO(rtenneti): We should set ProofVerifier in QuicClientSession.
153 crypto_config_.SetProofVerifier(verifier); 153 crypto_config_.SetProofVerifier(verifier);
154 } 154 }
155 155
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // when the stream is closed (in OnClose). 265 // when the stream is closed (in OnClose).
266 bool print_response_; 266 bool print_response_;
267 267
268 DISALLOW_COPY_AND_ASSIGN(QuicClient); 268 DISALLOW_COPY_AND_ASSIGN(QuicClient);
269 }; 269 };
270 270
271 } // namespace tools 271 } // namespace tools
272 } // namespace net 272 } // namespace net
273 273
274 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ 274 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698