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

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

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. 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/fake_session.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_FAKE_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_FAKE_SESSION_H_
6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_ 6 #define REMOTING_PROTOCOL_FAKE_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 int input_pos() const { return input_pos_; } 38 int input_pos() const { return input_pos_; }
39 bool read_pending() const { return read_pending_; } 39 bool read_pending() const { return read_pending_; }
40 40
41 // net::Socket implementation. 41 // net::Socket implementation.
42 virtual int Read(net::IOBuffer* buf, int buf_len, 42 virtual int Read(net::IOBuffer* buf, int buf_len,
43 net::OldCompletionCallback* callback) OVERRIDE; 43 net::OldCompletionCallback* callback) OVERRIDE;
44 virtual int Read(net::IOBuffer* buf, int buf_len, 44 virtual int Read(net::IOBuffer* buf, int buf_len,
45 const net::CompletionCallback& callback) OVERRIDE; 45 const net::CompletionCallback& callback) OVERRIDE;
46 virtual int Write(net::IOBuffer* buf, int buf_len, 46 virtual int Write(net::IOBuffer* buf, int buf_len,
47 net::OldCompletionCallback* callback) OVERRIDE; 47 net::OldCompletionCallback* callback) OVERRIDE;
48 virtual int Write(net::IOBuffer* buf, int buf_len,
49 const net::CompletionCallback& callback) OVERRIDE;
48 50
49 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 51 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
50 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 52 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
51 53
52 // net::StreamSocket implementation. 54 // net::StreamSocket implementation.
53 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; 55 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
54 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; 56 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE;
55 virtual void Disconnect() OVERRIDE; 57 virtual void Disconnect() OVERRIDE;
56 virtual bool IsConnected() const OVERRIDE; 58 virtual bool IsConnected() const OVERRIDE;
57 virtual bool IsConnectedAndIdle() const OVERRIDE; 59 virtual bool IsConnectedAndIdle() const OVERRIDE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void AppendInputPacket(const char* data, int data_size); 100 void AppendInputPacket(const char* data, int data_size);
99 int input_pos() const { return input_pos_; } 101 int input_pos() const { return input_pos_; }
100 102
101 // net::Socket implementation. 103 // net::Socket implementation.
102 virtual int Read(net::IOBuffer* buf, int buf_len, 104 virtual int Read(net::IOBuffer* buf, int buf_len,
103 net::OldCompletionCallback* callback) OVERRIDE; 105 net::OldCompletionCallback* callback) OVERRIDE;
104 virtual int Read(net::IOBuffer* buf, int buf_len, 106 virtual int Read(net::IOBuffer* buf, int buf_len,
105 const net::CompletionCallback& callback) OVERRIDE; 107 const net::CompletionCallback& callback) OVERRIDE;
106 virtual int Write(net::IOBuffer* buf, int buf_len, 108 virtual int Write(net::IOBuffer* buf, int buf_len,
107 net::OldCompletionCallback* callback) OVERRIDE; 109 net::OldCompletionCallback* callback) OVERRIDE;
110 virtual int Write(net::IOBuffer* buf, int buf_len,
111 const net::CompletionCallback& callback) OVERRIDE;
108 112
109 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 113 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
110 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 114 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
111 115
112 private: 116 private:
113 bool read_pending_; 117 bool read_pending_;
114 scoped_refptr<net::IOBuffer> read_buffer_; 118 scoped_refptr<net::IOBuffer> read_buffer_;
115 int read_buffer_size_; 119 int read_buffer_size_;
116 net::OldCompletionCallback* old_read_callback_; 120 net::OldCompletionCallback* old_read_callback_;
117 net::CompletionCallback read_callback_; 121 net::CompletionCallback read_callback_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 Session::Error error_; 184 Session::Error error_;
181 bool closed_; 185 bool closed_;
182 186
183 DISALLOW_COPY_AND_ASSIGN(FakeSession); 187 DISALLOW_COPY_AND_ASSIGN(FakeSession);
184 }; 188 };
185 189
186 } // namespace protocol 190 } // namespace protocol
187 } // namespace remoting 191 } // namespace remoting
188 192
189 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ 193 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698