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

Side by Side Diff: net/socket/ssl_client_socket_unittest.cc

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo 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 "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "net/base/address_list.h" 9 #include "net/base/address_list.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual int Read(IOBuffer* buf, 94 virtual int Read(IOBuffer* buf,
95 int buf_len, 95 int buf_len,
96 const CompletionCallback& callback) OVERRIDE { 96 const CompletionCallback& callback) OVERRIDE {
97 return transport_->Read(buf, buf_len, callback); 97 return transport_->Read(buf, buf_len, callback);
98 } 98 }
99 virtual int Write(IOBuffer* buf, 99 virtual int Write(IOBuffer* buf,
100 int buf_len, 100 int buf_len,
101 const CompletionCallback& callback) OVERRIDE { 101 const CompletionCallback& callback) OVERRIDE {
102 return transport_->Write(buf, buf_len, callback); 102 return transport_->Write(buf, buf_len, callback);
103 } 103 }
104 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { 104 virtual int SetReceiveBufferSize(int32 size) OVERRIDE {
105 return transport_->SetReceiveBufferSize(size); 105 return transport_->SetReceiveBufferSize(size);
106 } 106 }
107 virtual bool SetSendBufferSize(int32 size) OVERRIDE { 107 virtual int SetSendBufferSize(int32 size) OVERRIDE {
108 return transport_->SetSendBufferSize(size); 108 return transport_->SetSendBufferSize(size);
109 } 109 }
110 110
111 protected: 111 protected:
112 scoped_ptr<StreamSocket> transport_; 112 scoped_ptr<StreamSocket> transport_;
113 }; 113 };
114 114
115 // ReadBufferingStreamSocket is a wrapper for an existing StreamSocket that 115 // ReadBufferingStreamSocket is a wrapper for an existing StreamSocket that
116 // will ensure a certain amount of data is internally buffered before 116 // will ensure a certain amount of data is internally buffered before
117 // satisfying a Read() request. It exists to mimic OS-level internal 117 // satisfying a Read() request. It exists to mimic OS-level internal
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 2177
2178 // TODO(davidben): Read one byte to ensure the test server has responded and 2178 // TODO(davidben): Read one byte to ensure the test server has responded and
2179 // then assert IsConnectedAndIdle is false. This currently doesn't work 2179 // then assert IsConnectedAndIdle is false. This currently doesn't work
2180 // because neither SSLClientSocketNSS nor SSLClientSocketOpenSSL check their 2180 // because neither SSLClientSocketNSS nor SSLClientSocketOpenSSL check their
2181 // SSL implementation's internal buffers. Either call PR_Available and 2181 // SSL implementation's internal buffers. Either call PR_Available and
2182 // SSL_pending, although the former isn't actually implemented or perhaps 2182 // SSL_pending, although the former isn't actually implemented or perhaps
2183 // attempt to read one byte extra. 2183 // attempt to read one byte extra.
2184 } 2184 }
2185 2185
2186 } // namespace net 2186 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698