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

Side by Side Diff: media/cast/net/udp_transport.h

Issue 967723002: Cast: Fix crash in udp_transport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typ0 Created 5 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
« no previous file with comments | « no previous file | media/cast/net/udp_transport.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 MEDIA_CAST_NET_UDP_TRANSPORT_H_ 5 #ifndef MEDIA_CAST_NET_UDP_TRANSPORT_H_
6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_ 6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void ScheduleReceiveNextPacket(); 73 void ScheduleReceiveNextPacket();
74 74
75 void OnSent(const scoped_refptr<net::IOBuffer>& buf, 75 void OnSent(const scoped_refptr<net::IOBuffer>& buf,
76 PacketRef packet, 76 PacketRef packet,
77 const base::Closure& cb, 77 const base::Closure& cb,
78 int result); 78 int result);
79 79
80 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy_; 80 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy_;
81 const net::IPEndPoint local_addr_; 81 const net::IPEndPoint local_addr_;
82 net::IPEndPoint remote_addr_; 82 net::IPEndPoint remote_addr_;
83 const scoped_ptr<net::UDPSocket> udp_socket_; 83 scoped_ptr<net::UDPSocket> udp_socket_;
84 bool send_pending_; 84 bool send_pending_;
85 bool receive_pending_; 85 bool receive_pending_;
86 bool client_connected_; 86 bool client_connected_;
87 net::DiffServCodePoint next_dscp_value_; 87 net::DiffServCodePoint next_dscp_value_;
88 scoped_ptr<Packet> next_packet_; 88 scoped_ptr<Packet> next_packet_;
89 scoped_refptr<net::WrappedIOBuffer> recv_buf_; 89 scoped_refptr<net::WrappedIOBuffer> recv_buf_;
90 net::IPEndPoint recv_addr_; 90 net::IPEndPoint recv_addr_;
91 PacketReceiverCallbackWithStatus packet_receiver_; 91 PacketReceiverCallbackWithStatus packet_receiver_;
92 int32 send_buffer_size_; 92 int32 send_buffer_size_;
93 const CastTransportStatusCallback status_callback_; 93 const CastTransportStatusCallback status_callback_;
94 int bytes_sent_; 94 int bytes_sent_;
95 95
96 // NOTE: Weak pointers must be invalidated before all other member variables. 96 // NOTE: Weak pointers must be invalidated before all other member variables.
97 base::WeakPtrFactory<UdpTransport> weak_factory_; 97 base::WeakPtrFactory<UdpTransport> weak_factory_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(UdpTransport); 99 DISALLOW_COPY_AND_ASSIGN(UdpTransport);
100 }; 100 };
101 101
102 } // namespace cast 102 } // namespace cast
103 } // namespace media 103 } // namespace media
104 104
105 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_ 105 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_
OLDNEW
« no previous file with comments | « no previous file | media/cast/net/udp_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698