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

Side by Side Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_proxy_client_socket_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include <algorithm> // min 7 #include <algorithm> // min
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 DCHECK(spdy_stream_.get()); 238 DCHECK(spdy_stream_.get());
239 spdy_stream_->SendData(buf, buf_len, MORE_DATA_TO_SEND); 239 spdy_stream_->SendData(buf, buf_len, MORE_DATA_TO_SEND);
240 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT, 240 net_log_.AddByteTransferEvent(NetLog::TYPE_SOCKET_BYTES_SENT,
241 buf_len, buf->data()); 241 buf_len, buf->data());
242 write_callback_ = callback; 242 write_callback_ = callback;
243 write_buffer_len_ = buf_len; 243 write_buffer_len_ = buf_len;
244 return ERR_IO_PENDING; 244 return ERR_IO_PENDING;
245 } 245 }
246 246
247 int SpdyProxyClientSocket::SetReceiveBufferSize(int32 size) { 247 int SpdyProxyClientSocket::SetReceiveBufferSize(int32_t size) {
248 // Since this StreamSocket sits on top of a shared SpdySession, it 248 // Since this StreamSocket sits on top of a shared SpdySession, it
249 // is not safe for callers to change this underlying socket. 249 // is not safe for callers to change this underlying socket.
250 return ERR_NOT_IMPLEMENTED; 250 return ERR_NOT_IMPLEMENTED;
251 } 251 }
252 252
253 int SpdyProxyClientSocket::SetSendBufferSize(int32 size) { 253 int SpdyProxyClientSocket::SetSendBufferSize(int32_t size) {
254 // Since this StreamSocket sits on top of a shared SpdySession, it 254 // Since this StreamSocket sits on top of a shared SpdySession, it
255 // is not safe for callers to change this underlying socket. 255 // is not safe for callers to change this underlying socket.
256 return ERR_NOT_IMPLEMENTED; 256 return ERR_NOT_IMPLEMENTED;
257 } 257 }
258 258
259 int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { 259 int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const {
260 if (!IsConnected()) 260 if (!IsConnected())
261 return ERR_SOCKET_NOT_CONNECTED; 261 return ERR_SOCKET_NOT_CONNECTED;
262 return spdy_stream_->GetPeerAddress(address); 262 return spdy_stream_->GetPeerAddress(address);
263 } 263 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 } else if (!read_callback_.is_null()) { 529 } else if (!read_callback_.is_null()) {
530 // If we have a read_callback_, the we need to make sure we call it back. 530 // If we have a read_callback_, the we need to make sure we call it back.
531 OnDataReceived(scoped_ptr<SpdyBuffer>()); 531 OnDataReceived(scoped_ptr<SpdyBuffer>());
532 } 532 }
533 // This may have been deleted by read_callback_, so check first. 533 // This may have been deleted by read_callback_, so check first.
534 if (weak_ptr.get() && !write_callback.is_null()) 534 if (weak_ptr.get() && !write_callback.is_null())
535 write_callback.Run(ERR_CONNECTION_CLOSED); 535 write_callback.Run(ERR_CONNECTION_CLOSED);
536 } 536 }
537 537
538 } // namespace net 538 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.h ('k') | net/spdy/spdy_proxy_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698