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

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

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 #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
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
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_packet_reader.h ('k') | net/quic/platform/api/quic_socket_address.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698