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

Side by Side Diff: jingle/notifier/base/proxy_resolving_client_socket.cc

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/notifier/base/proxy_resolving_client_socket.h" 5 #include "jingle/notifier/base/proxy_resolving_client_socket.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return net::ERR_SOCKET_NOT_CONNECTED; 82 return net::ERR_SOCKET_NOT_CONNECTED;
83 } 83 }
84 84
85 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len, 85 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len,
86 net::OldCompletionCallback* callback) { 86 net::OldCompletionCallback* callback) {
87 if (transport_.get() && transport_->socket()) 87 if (transport_.get() && transport_->socket())
88 return transport_->socket()->Write(buf, buf_len, callback); 88 return transport_->socket()->Write(buf, buf_len, callback);
89 NOTREACHED(); 89 NOTREACHED();
90 return net::ERR_SOCKET_NOT_CONNECTED; 90 return net::ERR_SOCKET_NOT_CONNECTED;
91 } 91 }
92 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len,
93 const net::CompletionCallback& callback) {
94 if (transport_.get() && transport_->socket())
95 return transport_->socket()->Write(buf, buf_len, callback);
96 NOTREACHED();
97 return net::ERR_SOCKET_NOT_CONNECTED;
98 }
92 99
93 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) { 100 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) {
94 if (transport_.get() && transport_->socket()) 101 if (transport_.get() && transport_->socket())
95 return transport_->socket()->SetReceiveBufferSize(size); 102 return transport_->socket()->SetReceiveBufferSize(size);
96 NOTREACHED(); 103 NOTREACHED();
97 return false; 104 return false;
98 } 105 }
99 106
100 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) { 107 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) {
101 if (transport_.get() && transport_->socket()) 108 if (transport_.get() && transport_->socket())
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return base::TimeDelta::FromMicroseconds(-1); 418 return base::TimeDelta::FromMicroseconds(-1);
412 } 419 }
413 420
414 void ProxyResolvingClientSocket::CloseTransportSocket() { 421 void ProxyResolvingClientSocket::CloseTransportSocket() {
415 if (transport_.get() && transport_->socket()) 422 if (transport_.get() && transport_->socket())
416 transport_->socket()->Disconnect(); 423 transport_->socket()->Disconnect();
417 transport_.reset(); 424 transport_.reset();
418 } 425 }
419 426
420 } // namespace notifier 427 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/base/proxy_resolving_client_socket.h ('k') | net/curvecp/curvecp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698