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

Side by Side Diff: net/tools/quic/quic_simple_client.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
« no previous file with comments | « net/tools/quic/quic_simple_client.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/tools/quic/quic_simple_client.h" 5 #include "net/tools/quic/quic_simple_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 const DatagramClientSocket* socket) { 147 const DatagramClientSocket* socket) {
148 LOG(ERROR) << "QuicSimpleClient read failed: " << ErrorToShortString(result); 148 LOG(ERROR) << "QuicSimpleClient read failed: " << ErrorToShortString(result);
149 Disconnect(); 149 Disconnect();
150 } 150 }
151 151
152 QuicSocketAddress QuicSimpleClient::GetLatestClientAddress() const { 152 QuicSocketAddress QuicSimpleClient::GetLatestClientAddress() const {
153 return client_address_; 153 return client_address_;
154 } 154 }
155 155
156 bool QuicSimpleClient::OnPacket(const QuicReceivedPacket& packet, 156 bool QuicSimpleClient::OnPacket(const QuicReceivedPacket& packet,
157 const IPEndPoint& local_address, 157 const QuicSocketAddress& local_address,
158 const IPEndPoint& peer_address) { 158 const QuicSocketAddress& peer_address) {
159 session()->connection()->ProcessUdpPacket( 159 session()->connection()->ProcessUdpPacket(local_address, peer_address,
160 QuicSocketAddress(QuicSocketAddressImpl(local_address)), 160 packet);
161 QuicSocketAddress(QuicSocketAddressImpl(peer_address)), packet);
162 if (!session()->connection()->connected()) { 161 if (!session()->connection()->connected()) {
163 return false; 162 return false;
164 } 163 }
165 164
166 return true; 165 return true;
167 } 166 }
168 167
169 } // namespace net 168 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698