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

Side by Side Diff: net/socket/socks5_client_socket.cc

Issue 2235973002: Add a SetDoNotFragment() method to DatagramSocket, and call this for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Blimp Created 4 years, 4 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) 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/socket/socks5_client_socket.h" 5 #include "net/socket/socks5_client_socket.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 int SOCKS5ClientSocket::SetReceiveBufferSize(int32_t size) { 184 int SOCKS5ClientSocket::SetReceiveBufferSize(int32_t size) {
185 return transport_->socket()->SetReceiveBufferSize(size); 185 return transport_->socket()->SetReceiveBufferSize(size);
186 } 186 }
187 187
188 int SOCKS5ClientSocket::SetSendBufferSize(int32_t size) { 188 int SOCKS5ClientSocket::SetSendBufferSize(int32_t size) {
189 return transport_->socket()->SetSendBufferSize(size); 189 return transport_->socket()->SetSendBufferSize(size);
190 } 190 }
191 191
192 int SOCKS5ClientSocket::SetDoNotFragment(bool do_not_fragment) {
193 return transport_->socket()->SetDoNotFragment(do_not_fragment);
194 }
195
192 void SOCKS5ClientSocket::DoCallback(int result) { 196 void SOCKS5ClientSocket::DoCallback(int result) {
193 DCHECK_NE(ERR_IO_PENDING, result); 197 DCHECK_NE(ERR_IO_PENDING, result);
194 DCHECK(!user_callback_.is_null()); 198 DCHECK(!user_callback_.is_null());
195 199
196 // Since Run() may result in Read being called, 200 // Since Run() may result in Read being called,
197 // clear user_callback_ up front. 201 // clear user_callback_ up front.
198 base::ResetAndReturn(&user_callback_).Run(result); 202 base::ResetAndReturn(&user_callback_).Run(result);
199 } 203 }
200 204
201 void SOCKS5ClientSocket::OnIOComplete(int result) { 205 void SOCKS5ClientSocket::OnIOComplete(int result) {
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 499
496 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const { 500 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const {
497 return transport_->socket()->GetPeerAddress(address); 501 return transport_->socket()->GetPeerAddress(address);
498 } 502 }
499 503
500 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { 504 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const {
501 return transport_->socket()->GetLocalAddress(address); 505 return transport_->socket()->GetLocalAddress(address);
502 } 506 }
503 507
504 } // namespace net 508 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698