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

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

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_simple_client.cc » ('j') | 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 // 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_SIMPLE_CLIENT_H_ 8 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_
9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ 9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_
10 10
(...skipping 10 matching lines...) Expand all
21 #include "net/http/http_response_headers.h" 21 #include "net/http/http_response_headers.h"
22 #include "net/log/net_log.h" 22 #include "net/log/net_log.h"
23 #include "net/quic/quic_chromium_packet_reader.h" 23 #include "net/quic/quic_chromium_packet_reader.h"
24 #include "net/quic/quic_config.h" 24 #include "net/quic/quic_config.h"
25 #include "net/quic/quic_spdy_stream.h" 25 #include "net/quic/quic_spdy_stream.h"
26 #include "net/tools/quic/quic_client_base.h" 26 #include "net/tools/quic/quic_client_base.h"
27 27
28 namespace net { 28 namespace net {
29 29
30 struct HttpRequestInfo; 30 struct HttpRequestInfo;
31 class QuicChromiumAlarmFactory;
31 class QuicChromiumConnectionHelper; 32 class QuicChromiumConnectionHelper;
32 class UDPClientSocket; 33 class UDPClientSocket;
33 34
34 35
35 namespace test { 36 namespace test {
36 class QuicClientPeer; 37 class QuicClientPeer;
37 } // namespace test 38 } // namespace test
38 39
39 class QuicSimpleClient : public QuicClientBase, 40 class QuicSimpleClient : public QuicClientBase,
40 public QuicSpdyStream::Visitor, 41 public QuicSpdyStream::Visitor,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 response_listener_.reset(listener); 160 response_listener_.reset(listener);
160 } 161 }
161 162
162 void set_store_response(bool val) { store_response_ = val; } 163 void set_store_response(bool val) { store_response_ = val; }
163 164
164 size_t latest_response_code() const; 165 size_t latest_response_code() const;
165 const std::string& latest_response_headers() const; 166 const std::string& latest_response_headers() const;
166 const std::string& latest_response_body() const; 167 const std::string& latest_response_body() const;
167 168
168 protected: 169 protected:
170 virtual QuicChromiumAlarmFactory* CreateQuicAlarmFactory();
169 virtual QuicChromiumConnectionHelper* CreateQuicConnectionHelper(); 171 virtual QuicChromiumConnectionHelper* CreateQuicConnectionHelper();
170 virtual QuicPacketWriter* CreateQuicPacketWriter(); 172 virtual QuicPacketWriter* CreateQuicPacketWriter();
171 173
172 private: 174 private:
173 friend class net::test::QuicClientPeer; 175 friend class net::test::QuicClientPeer;
174 176
175 // Specific QuicClient class for storing data to resend. 177 // Specific QuicClient class for storing data to resend.
176 class ClientQuicDataToResend : public QuicDataToResend { 178 class ClientQuicDataToResend : public QuicDataToResend {
177 public: 179 public:
178 // Takes ownership of |headers|. 180 // Takes ownership of |headers|.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 bool packet_reader_started_; 262 bool packet_reader_started_;
261 263
262 base::WeakPtrFactory<QuicSimpleClient> weak_factory_; 264 base::WeakPtrFactory<QuicSimpleClient> weak_factory_;
263 265
264 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); 266 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient);
265 }; 267 };
266 268
267 } // namespace net 269 } // namespace net
268 270
269 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ 271 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_simple_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698