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

Side by Side Diff: jingle/notifier/base/fake_ssl_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/fake_ssl_client_socket.h" 5 #include "jingle/notifier/base/fake_ssl_client_socket.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return transport_socket_->Read(buf, buf_len, callback); 105 return transport_socket_->Read(buf, buf_len, callback);
106 } 106 }
107 int FakeSSLClientSocket::Read(net::IOBuffer* buf, int buf_len, 107 int FakeSSLClientSocket::Read(net::IOBuffer* buf, int buf_len,
108 const net::CompletionCallback& callback) { 108 const net::CompletionCallback& callback) {
109 DCHECK_EQ(next_handshake_state_, STATE_NONE); 109 DCHECK_EQ(next_handshake_state_, STATE_NONE);
110 DCHECK(handshake_completed_); 110 DCHECK(handshake_completed_);
111 return transport_socket_->Read(buf, buf_len, callback); 111 return transport_socket_->Read(buf, buf_len, callback);
112 } 112 }
113 113
114 int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len, 114 int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len,
115 net::OldCompletionCallback* callback) { 115 net::OldCompletionCallback* callback) {
116 DCHECK_EQ(next_handshake_state_, STATE_NONE);
117 DCHECK(handshake_completed_);
118 return transport_socket_->Write(buf, buf_len, callback);
119 }
120 int FakeSSLClientSocket::Write(net::IOBuffer* buf, int buf_len,
121 const net::CompletionCallback& callback) {
122 DCHECK_EQ(next_handshake_state_, STATE_NONE); 116 DCHECK_EQ(next_handshake_state_, STATE_NONE);
123 DCHECK(handshake_completed_); 117 DCHECK(handshake_completed_);
124 return transport_socket_->Write(buf, buf_len, callback); 118 return transport_socket_->Write(buf, buf_len, callback);
125 } 119 }
126 120
127 bool FakeSSLClientSocket::SetReceiveBufferSize(int32 size) { 121 bool FakeSSLClientSocket::SetReceiveBufferSize(int32 size) {
128 return transport_socket_->SetReceiveBufferSize(size); 122 return transport_socket_->SetReceiveBufferSize(size);
129 } 123 }
130 124
131 bool FakeSSLClientSocket::SetSendBufferSize(int32 size) { 125 bool FakeSSLClientSocket::SetSendBufferSize(int32 size) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 369
376 int64 FakeSSLClientSocket::NumBytesRead() const { 370 int64 FakeSSLClientSocket::NumBytesRead() const {
377 return transport_socket_->NumBytesRead(); 371 return transport_socket_->NumBytesRead();
378 } 372 }
379 373
380 base::TimeDelta FakeSSLClientSocket::GetConnectTimeMicros() const { 374 base::TimeDelta FakeSSLClientSocket::GetConnectTimeMicros() const {
381 return transport_socket_->GetConnectTimeMicros(); 375 return transport_socket_->GetConnectTimeMicros();
382 } 376 }
383 377
384 } // namespace notifier 378 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/base/fake_ssl_client_socket.h ('k') | jingle/notifier/base/fake_ssl_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698