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

Side by Side Diff: trunk/src/remoting/jingle_glue/chromium_socket_factory.cc

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/net/udp/udp_socket_win.cc ('k') | trunk/src/remoting/protocol/channel_multiplexer.cc » ('j') | 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 "remoting/jingle_glue/chromium_socket_factory.h" 5 #include "remoting/jingle_glue/chromium_socket_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "jingle/glue/utils.h" 10 #include "jingle/glue/utils.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 NOTREACHED(); 218 NOTREACHED();
219 return EINVAL; 219 return EINVAL;
220 } 220 }
221 221
222 switch (option) { 222 switch (option) {
223 case talk_base::Socket::OPT_DONTFRAGMENT: 223 case talk_base::Socket::OPT_DONTFRAGMENT:
224 NOTIMPLEMENTED(); 224 NOTIMPLEMENTED();
225 return -1; 225 return -1;
226 226
227 case talk_base::Socket::OPT_RCVBUF: { 227 case talk_base::Socket::OPT_RCVBUF: {
228 int net_error = socket_->SetReceiveBufferSize(value); 228 bool success = socket_->SetReceiveBufferSize(value);
229 return (net_error == net::OK) ? 0 : -1; 229 return success ? 0 : -1;
230 } 230 }
231 231
232 case talk_base::Socket::OPT_SNDBUF: { 232 case talk_base::Socket::OPT_SNDBUF: {
233 int net_error = socket_->SetSendBufferSize(value); 233 bool success = socket_->SetSendBufferSize(value);
234 return (net_error == net::OK) ? 0 : -1; 234 return success ? 0 : -1;
235 } 235 }
236 236
237 case talk_base::Socket::OPT_NODELAY: 237 case talk_base::Socket::OPT_NODELAY:
238 // OPT_NODELAY is only for TCP sockets. 238 // OPT_NODELAY is only for TCP sockets.
239 NOTREACHED(); 239 NOTREACHED();
240 return -1; 240 return -1;
241 241
242 case talk_base::Socket::OPT_IPV6_V6ONLY: 242 case talk_base::Socket::OPT_IPV6_V6ONLY:
243 NOTIMPLEMENTED(); 243 NOTIMPLEMENTED();
244 return -1; 244 return -1;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 NOTREACHED(); 376 NOTREACHED();
377 return NULL; 377 return NULL;
378 } 378 }
379 379
380 talk_base::AsyncResolverInterface* 380 talk_base::AsyncResolverInterface*
381 ChromiumPacketSocketFactory::CreateAsyncResolver() { 381 ChromiumPacketSocketFactory::CreateAsyncResolver() {
382 return new talk_base::AsyncResolver(); 382 return new talk_base::AsyncResolver();
383 } 383 }
384 384
385 } // namespace remoting 385 } // namespace remoting
OLDNEW
« no previous file with comments | « trunk/src/net/udp/udp_socket_win.cc ('k') | trunk/src/remoting/protocol/channel_multiplexer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698