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

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

Issue 8889036: Revert 113699 - base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
Property Changes:
Deleted: svn:mergeinfo
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 }
99 92
100 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) { 93 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) {
101 if (transport_.get() && transport_->socket()) 94 if (transport_.get() && transport_->socket())
102 return transport_->socket()->SetReceiveBufferSize(size); 95 return transport_->socket()->SetReceiveBufferSize(size);
103 NOTREACHED(); 96 NOTREACHED();
104 return false; 97 return false;
105 } 98 }
106 99
107 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) { 100 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) {
108 if (transport_.get() && transport_->socket()) 101 if (transport_.get() && transport_->socket())
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 return base::TimeDelta::FromMicroseconds(-1); 411 return base::TimeDelta::FromMicroseconds(-1);
419 } 412 }
420 413
421 void ProxyResolvingClientSocket::CloseTransportSocket() { 414 void ProxyResolvingClientSocket::CloseTransportSocket() {
422 if (transport_.get() && transport_->socket()) 415 if (transport_.get() && transport_->socket())
423 transport_->socket()->Disconnect(); 416 transport_->socket()->Disconnect();
424 transport_.reset(); 417 transport_.reset();
425 } 418 }
426 419
427 } // namespace notifier 420 } // 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