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

Side by Side Diff: net/quic/quic_chromium_packet_writer.h

Issue 1662433002: Per-packet options now passed through to QuicPacketWriter, instead of (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113054959
Patch Set: Fix comments for Patch Set 1 Created 4 years, 10 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 | « no previous file | net/quic/quic_chromium_packet_writer.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 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_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 5 #ifndef NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
6 #define NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 6 #define NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 class NET_EXPORT_PRIVATE QuicChromiumPacketWriter : public QuicPacketWriter { 23 class NET_EXPORT_PRIVATE QuicChromiumPacketWriter : public QuicPacketWriter {
24 public: 24 public:
25 QuicChromiumPacketWriter(); 25 QuicChromiumPacketWriter();
26 explicit QuicChromiumPacketWriter(Socket* socket); 26 explicit QuicChromiumPacketWriter(Socket* socket);
27 ~QuicChromiumPacketWriter() override; 27 ~QuicChromiumPacketWriter() override;
28 28
29 // QuicPacketWriter 29 // QuicPacketWriter
30 WriteResult WritePacket(const char* buffer, 30 WriteResult WritePacket(const char* buffer,
31 size_t buf_len, 31 size_t buf_len,
32 const IPAddressNumber& self_address, 32 const IPAddressNumber& self_address,
33 const IPEndPoint& peer_address) override; 33 const IPEndPoint& peer_address,
34 PerPacketOptions* options) override;
34 bool IsWriteBlockedDataBuffered() const override; 35 bool IsWriteBlockedDataBuffered() const override;
35 bool IsWriteBlocked() const override; 36 bool IsWriteBlocked() const override;
36 void SetWritable() override; 37 void SetWritable() override;
37 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override; 38 QuicByteCount GetMaxPacketSize(const IPEndPoint& peer_address) const override;
38 39
39 void OnWriteComplete(int rv); 40 void OnWriteComplete(int rv);
40 void SetConnection(QuicConnection* connection) { connection_ = connection; } 41 void SetConnection(QuicConnection* connection) { connection_ = connection; }
41 42
42 protected: 43 protected:
43 void set_write_blocked(bool is_blocked) { write_blocked_ = is_blocked; } 44 void set_write_blocked(bool is_blocked) { write_blocked_ = is_blocked; }
44 45
45 private: 46 private:
46 Socket* socket_; 47 Socket* socket_;
47 QuicConnection* connection_; 48 QuicConnection* connection_;
48 49
49 // Whether a write is currently in flight. 50 // Whether a write is currently in flight.
50 bool write_blocked_; 51 bool write_blocked_;
51 52
52 base::WeakPtrFactory<QuicChromiumPacketWriter> weak_factory_; 53 base::WeakPtrFactory<QuicChromiumPacketWriter> weak_factory_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketWriter); 55 DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketWriter);
55 }; 56 };
56 57
57 } // namespace net 58 } // namespace net
58 59
59 #endif // NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 60 #endif // NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_chromium_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698