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

Side by Side Diff: net/quic/chromium/quic_chromium_packet_reader.h

Issue 2874333002: Construct QuicSocketAddressImpl in QuicChromiumPacketReadder and pass it by const&. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 5
6 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_ 6 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_
7 #define NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_ 7 #define NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 15 matching lines...) Expand all
26 const int kQuicYieldAfterDurationMilliseconds = 20; 26 const int kQuicYieldAfterDurationMilliseconds = 20;
27 27
28 class NET_EXPORT_PRIVATE QuicChromiumPacketReader { 28 class NET_EXPORT_PRIVATE QuicChromiumPacketReader {
29 public: 29 public:
30 class NET_EXPORT_PRIVATE Visitor { 30 class NET_EXPORT_PRIVATE Visitor {
31 public: 31 public:
32 virtual ~Visitor() {} 32 virtual ~Visitor() {}
33 virtual void OnReadError(int result, 33 virtual void OnReadError(int result,
34 const DatagramClientSocket* socket) = 0; 34 const DatagramClientSocket* socket) = 0;
35 virtual bool OnPacket(const QuicReceivedPacket& packet, 35 virtual bool OnPacket(const QuicReceivedPacket& packet,
36 const IPEndPoint& local_address, 36 const QuicSocketAddress& local_address,
37 const IPEndPoint& peer_address) = 0; 37 const QuicSocketAddress& peer_address) = 0;
38 }; 38 };
39 39
40 QuicChromiumPacketReader(DatagramClientSocket* socket, 40 QuicChromiumPacketReader(DatagramClientSocket* socket,
41 QuicClock* clock, 41 QuicClock* clock,
42 Visitor* visitor, 42 Visitor* visitor,
43 int yield_after_packets, 43 int yield_after_packets,
44 QuicTime::Delta yield_after_duration, 44 QuicTime::Delta yield_after_duration,
45 const NetLogWithSource& net_log); 45 const NetLogWithSource& net_log);
46 virtual ~QuicChromiumPacketReader(); 46 virtual ~QuicChromiumPacketReader();
47 47
(...skipping 20 matching lines...) Expand all
68 NetLogWithSource net_log_; 68 NetLogWithSource net_log_;
69 69
70 base::WeakPtrFactory<QuicChromiumPacketReader> weak_factory_; 70 base::WeakPtrFactory<QuicChromiumPacketReader> weak_factory_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketReader); 72 DISALLOW_COPY_AND_ASSIGN(QuicChromiumPacketReader);
73 }; 73 };
74 74
75 } // namespace net 75 } // namespace net
76 76
77 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_ 77 #endif // NET_QUIC_CHROMIUM_QUIC_CHROMIUM_PACKET_READER_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_session.cc ('k') | net/quic/chromium/quic_chromium_packet_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698