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

Side by Side Diff: remoting/protocol/buffered_socket_writer.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/buffered_socket_writer.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) 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 #ifndef REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ 5 #ifndef REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_
6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ 6 #define REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Must be locked when accessing |socket_|, |queue_| and |buffer_size_|; 93 // Must be locked when accessing |socket_|, |queue_| and |buffer_size_|;
94 base::Lock lock_; 94 base::Lock lock_;
95 95
96 net::Socket* socket_; 96 net::Socket* socket_;
97 scoped_refptr<base::MessageLoopProxy> message_loop_; 97 scoped_refptr<base::MessageLoopProxy> message_loop_;
98 WriteFailedCallback write_failed_callback_; 98 WriteFailedCallback write_failed_callback_;
99 99
100 bool write_pending_; 100 bool write_pending_;
101 101
102 net::OldCompletionCallbackImpl<BufferedSocketWriterBase> written_callback_;
103
104 bool closed_; 102 bool closed_;
105 }; 103 };
106 104
107 class BufferedSocketWriter : public BufferedSocketWriterBase { 105 class BufferedSocketWriter : public BufferedSocketWriterBase {
108 public: 106 public:
109 explicit BufferedSocketWriter(base::MessageLoopProxy* message_loop); 107 explicit BufferedSocketWriter(base::MessageLoopProxy* message_loop);
110 virtual ~BufferedSocketWriter(); 108 virtual ~BufferedSocketWriter();
111 109
112 protected: 110 protected:
113 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE; 111 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE;
(...skipping 12 matching lines...) Expand all
126 protected: 124 protected:
127 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE; 125 virtual void GetNextPacket_Locked(net::IOBuffer** buffer, int* size) OVERRIDE;
128 virtual void AdvanceBufferPosition_Locked(int written) OVERRIDE; 126 virtual void AdvanceBufferPosition_Locked(int written) OVERRIDE;
129 virtual void OnError_Locked(int result) OVERRIDE; 127 virtual void OnError_Locked(int result) OVERRIDE;
130 }; 128 };
131 129
132 } // namespace protocol 130 } // namespace protocol
133 } // namespace remoting 131 } // namespace remoting
134 132
135 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_ 133 #endif // REMOTING_PROTOCOL_BUFFERED_SOCKET_WRITER_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698