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

Side by Side Diff: net/tools/quic/quic_default_packet_writer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_QUIC_DEFAULT_PACKET_WRITER_H_ 5 #ifndef NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
6 #define NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 6 #define NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/quic/quic_packet_writer.h" 10 #include "net/quic/quic_packet_writer.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 struct WriteResult; 14 struct WriteResult;
15 15
16 namespace tools { 16 namespace tools {
17 17
18 // Default packet writer which wraps QuicSocketUtils WritePacket. 18 // Default packet writer which wraps QuicSocketUtils WritePacket.
19 class QuicDefaultPacketWriter : public QuicPacketWriter { 19 class QuicDefaultPacketWriter : public QuicPacketWriter {
20 public: 20 public:
21 explicit QuicDefaultPacketWriter(int fd); 21 explicit QuicDefaultPacketWriter(int fd);
22 virtual ~QuicDefaultPacketWriter(); 22 virtual ~QuicDefaultPacketWriter();
23 23
24 // QuicPacketWriter 24 // QuicPacketWriter
25 virtual WriteResult WritePacket( 25 virtual WriteResult WritePacket(const char* buffer,
26 const char* buffer, size_t buf_len, 26 size_t buf_len,
27 const net::IPAddressNumber& self_address, 27 const net::IPAddressNumber& self_address,
28 const net::IPEndPoint& peer_address) OVERRIDE; 28 const net::IPEndPoint& peer_address) OVERRIDE;
29 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; 29 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE;
30 virtual bool IsWriteBlocked() const OVERRIDE; 30 virtual bool IsWriteBlocked() const OVERRIDE;
31 virtual void SetWritable() OVERRIDE; 31 virtual void SetWritable() OVERRIDE;
32 32
33 void set_fd(int fd) { fd_ = fd; } 33 void set_fd(int fd) { fd_ = fd; }
34 34
35 private: 35 private:
36 int fd_; 36 int fd_;
37 bool write_blocked_; 37 bool write_blocked_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); 39 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter);
40 }; 40 };
41 41
42 } // namespace tools 42 } // namespace tools
43 } // namespace net 43 } // namespace net
44 44
45 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 45 #endif // NET_TOOLS_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698