OLD | NEW |
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 #include "net/quic/chromium/quic_chromium_packet_reader.h" | 5 #include "net/quic/chromium/quic_chromium_packet_reader.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 if (result < 0) { | 79 if (result < 0) { |
80 visitor_->OnReadError(result, socket_); | 80 visitor_->OnReadError(result, socket_); |
81 return; | 81 return; |
82 } | 82 } |
83 | 83 |
84 QuicReceivedPacket packet(read_buffer_->data(), result, clock_->Now()); | 84 QuicReceivedPacket packet(read_buffer_->data(), result, clock_->Now()); |
85 IPEndPoint local_address; | 85 IPEndPoint local_address; |
86 IPEndPoint peer_address; | 86 IPEndPoint peer_address; |
87 socket_->GetLocalAddress(&local_address); | 87 socket_->GetLocalAddress(&local_address); |
88 socket_->GetPeerAddress(&peer_address); | 88 socket_->GetPeerAddress(&peer_address); |
89 if (!visitor_->OnPacket(packet, local_address, peer_address)) | 89 if (!visitor_->OnPacket( |
| 90 packet, QuicSocketAddress(QuicSocketAddressImpl(local_address)), |
| 91 QuicSocketAddress(QuicSocketAddressImpl(peer_address)))) |
90 return; | 92 return; |
91 | 93 |
92 StartReading(); | 94 StartReading(); |
93 } | 95 } |
94 | 96 |
95 } // namespace net | 97 } // namespace net |
OLD | NEW |