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

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

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/quic/quic_per_connection_packet_writer.cc ('k') | net/quic/quic_server_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVER_PACKET_WRITER_H_ 5 #ifndef NET_QUIC_QUIC_SERVER_PACKET_WRITER_H_
6 #define NET_QUIC_QUIC_SERVER_PACKET_WRITER_H_ 6 #define NET_QUIC_QUIC_SERVER_PACKET_WRITER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 virtual bool IsWriteBlocked() const OVERRIDE; 45 virtual bool IsWriteBlocked() const OVERRIDE;
46 virtual void SetWritable() OVERRIDE; 46 virtual void SetWritable() OVERRIDE;
47 47
48 protected: 48 protected:
49 // Do not call WritePacket on its own -- use WritePacketWithCallback 49 // Do not call WritePacket on its own -- use WritePacketWithCallback
50 virtual WriteResult WritePacket(const char* buffer, 50 virtual WriteResult WritePacket(const char* buffer,
51 size_t buf_len, 51 size_t buf_len,
52 const IPAddressNumber& self_address, 52 const IPAddressNumber& self_address,
53 const IPEndPoint& peer_address) OVERRIDE; 53 const IPEndPoint& peer_address) OVERRIDE;
54 private: 54 private:
55 base::WeakPtrFactory<QuicServerPacketWriter> weak_factory_;
56 UDPServerSocket* socket_; 55 UDPServerSocket* socket_;
57 56
58 // To be notified after every successful asynchronous write. 57 // To be notified after every successful asynchronous write.
59 QuicBlockedWriterInterface* blocked_writer_; 58 QuicBlockedWriterInterface* blocked_writer_;
60 59
61 // To call once the write completes. 60 // To call once the write completes.
62 WriteCallback callback_; 61 WriteCallback callback_;
63 62
64 // Whether a write is currently in flight. 63 // Whether a write is currently in flight.
65 bool write_blocked_; 64 bool write_blocked_;
66 65
66 base::WeakPtrFactory<QuicServerPacketWriter> weak_factory_;
67
67 DISALLOW_COPY_AND_ASSIGN(QuicServerPacketWriter); 68 DISALLOW_COPY_AND_ASSIGN(QuicServerPacketWriter);
68 }; 69 };
69 70
70 } // namespace net 71 } // namespace net
71 72
72 #endif // NET_QUIC_QUIC_SERVER_PACKET_WRITER_H_ 73 #endif // NET_QUIC_QUIC_SERVER_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_per_connection_packet_writer.cc ('k') | net/quic/quic_server_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698