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

Side by Side Diff: net/socket/buffered_write_stream_socket.h

Issue 10491007: fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix according to review Created 8 years, 6 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
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/socket/buffered_write_stream_socket.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 #ifndef NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ 5 #ifndef NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_
6 #define NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ 6 #define NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 virtual int Write(IOBuffer* buf, int buf_len, 43 virtual int Write(IOBuffer* buf, int buf_len,
44 const CompletionCallback& callback) OVERRIDE; 44 const CompletionCallback& callback) OVERRIDE;
45 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 45 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
46 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 46 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
47 47
48 // StreamSocket interface 48 // StreamSocket interface
49 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 49 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
50 virtual void Disconnect() OVERRIDE; 50 virtual void Disconnect() OVERRIDE;
51 virtual bool IsConnected() const OVERRIDE; 51 virtual bool IsConnected() const OVERRIDE;
52 virtual bool IsConnectedAndIdle() const OVERRIDE; 52 virtual bool IsConnectedAndIdle() const OVERRIDE;
53 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; 53 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE;
54 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; 54 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
55 virtual const BoundNetLog& NetLog() const OVERRIDE; 55 virtual const BoundNetLog& NetLog() const OVERRIDE;
56 virtual void SetSubresourceSpeculation() OVERRIDE; 56 virtual void SetSubresourceSpeculation() OVERRIDE;
57 virtual void SetOmniboxSpeculation() OVERRIDE; 57 virtual void SetOmniboxSpeculation() OVERRIDE;
58 virtual bool WasEverUsed() const OVERRIDE; 58 virtual bool WasEverUsed() const OVERRIDE;
59 virtual bool UsingTCPFastOpen() const OVERRIDE; 59 virtual bool UsingTCPFastOpen() const OVERRIDE;
60 virtual int64 NumBytesRead() const OVERRIDE; 60 virtual int64 NumBytesRead() const OVERRIDE;
61 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 61 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
62 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; 62 virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
63 63
64 private: 64 private:
65 void DoDelayedWrite(); 65 void DoDelayedWrite();
66 void OnIOComplete(int result); 66 void OnIOComplete(int result);
67 67
68 scoped_ptr<StreamSocket> wrapped_socket_; 68 scoped_ptr<StreamSocket> wrapped_socket_;
69 scoped_refptr<GrowableIOBuffer> io_buffer_; 69 scoped_refptr<GrowableIOBuffer> io_buffer_;
70 scoped_refptr<GrowableIOBuffer> backup_buffer_; 70 scoped_refptr<GrowableIOBuffer> backup_buffer_;
71 base::WeakPtrFactory<BufferedWriteStreamSocket> weak_factory_; 71 base::WeakPtrFactory<BufferedWriteStreamSocket> weak_factory_;
72 bool callback_pending_; 72 bool callback_pending_;
73 bool wrapped_write_in_progress_; 73 bool wrapped_write_in_progress_;
74 int error_; 74 int error_;
75 }; 75 };
76 76
77 } // namespace net 77 } // namespace net
78 78
79 #endif // NET_SOCKET_STREAM_SOCKET_H_ 79 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/socket/buffered_write_stream_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698