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

Side by Side Diff: net/quic/quic_default_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_connection_helper.cc ('k') | net/quic/quic_default_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 "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 27 matching lines...) Expand all
38 void SetConnection(QuicConnection* connection) { 38 void SetConnection(QuicConnection* connection) {
39 connection_ = connection; 39 connection_ = connection;
40 } 40 }
41 41
42 protected: 42 protected:
43 void set_write_blocked(bool is_blocked) { 43 void set_write_blocked(bool is_blocked) {
44 write_blocked_ = is_blocked; 44 write_blocked_ = is_blocked;
45 } 45 }
46 46
47 private: 47 private:
48 base::WeakPtrFactory<QuicDefaultPacketWriter> weak_factory_;
49 DatagramClientSocket* socket_; 48 DatagramClientSocket* socket_;
50 QuicConnection* connection_; 49 QuicConnection* connection_;
51 50
52 // Whether a write is currently in flight. 51 // Whether a write is currently in flight.
53 bool write_blocked_; 52 bool write_blocked_;
54 53
54 base::WeakPtrFactory<QuicDefaultPacketWriter> weak_factory_;
55
55 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter); 56 DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter);
56 }; 57 };
57 58
58 } // namespace net 59 } // namespace net
59 60
60 #endif // NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_ 61 #endif // NET_QUIC_QUIC_DEFAULT_PACKET_WRITER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection_helper.cc ('k') | net/quic/quic_default_packet_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698