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

Side by Side Diff: jingle/glue/pseudotcp_adapter.cc

Issue 217573002: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo on Linux 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
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 "jingle/glue/pseudotcp_adapter.h" 5 #include "jingle/glue/pseudotcp_adapter.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 DCHECK(CalledOnValidThread()); 477 DCHECK(CalledOnValidThread());
478 return core_->Read(buffer, buffer_size, callback); 478 return core_->Read(buffer, buffer_size, callback);
479 } 479 }
480 480
481 int PseudoTcpAdapter::Write(net::IOBuffer* buffer, int buffer_size, 481 int PseudoTcpAdapter::Write(net::IOBuffer* buffer, int buffer_size,
482 const net::CompletionCallback& callback) { 482 const net::CompletionCallback& callback) {
483 DCHECK(CalledOnValidThread()); 483 DCHECK(CalledOnValidThread());
484 return core_->Write(buffer, buffer_size, callback); 484 return core_->Write(buffer, buffer_size, callback);
485 } 485 }
486 486
487 bool PseudoTcpAdapter::SetReceiveBufferSize(int32 size) { 487 int PseudoTcpAdapter::SetReceiveBufferSize(int32 size) {
488 DCHECK(CalledOnValidThread()); 488 DCHECK(CalledOnValidThread());
489 489
490 core_->SetReceiveBufferSize(size); 490 core_->SetReceiveBufferSize(size);
491 return false; 491 return net::OK;
Ryan Hamilton 2014/04/08 19:55:11 One more instance of a semantic change here.
jar (doing other things) 2014/04/08 23:16:26 I *think* I understand the call sites (which were
492 } 492 }
493 493
494 bool PseudoTcpAdapter::SetSendBufferSize(int32 size) { 494 int PseudoTcpAdapter::SetSendBufferSize(int32 size) {
495 DCHECK(CalledOnValidThread()); 495 DCHECK(CalledOnValidThread());
496 496
497 core_->SetSendBufferSize(size); 497 core_->SetSendBufferSize(size);
498 return false; 498 return net::OK;
499 } 499 }
500 500
501 int PseudoTcpAdapter::Connect(const net::CompletionCallback& callback) { 501 int PseudoTcpAdapter::Connect(const net::CompletionCallback& callback) {
502 DCHECK(CalledOnValidThread()); 502 DCHECK(CalledOnValidThread());
503 503
504 // net::StreamSocket requires that Connect return OK if already connected. 504 // net::StreamSocket requires that Connect return OK if already connected.
505 if (IsConnected()) 505 if (IsConnected())
506 return net::OK; 506 return net::OK;
507 507
508 return core_->Connect(callback); 508 return core_->Connect(callback);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 DCHECK(CalledOnValidThread()); 589 DCHECK(CalledOnValidThread());
590 core_->SetNoDelay(no_delay); 590 core_->SetNoDelay(no_delay);
591 } 591 }
592 592
593 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) { 593 void PseudoTcpAdapter::SetWriteWaitsForSend(bool write_waits_for_send) {
594 DCHECK(CalledOnValidThread()); 594 DCHECK(CalledOnValidThread());
595 core_->SetWriteWaitsForSend(write_waits_for_send); 595 core_->SetWriteWaitsForSend(write_waits_for_send);
596 } 596 }
597 597
598 } // namespace jingle_glue 598 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698