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

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

Issue 8889036: Revert 113699 - base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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;
50 48
51 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 49 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
52 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 50 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
53 51
54 // net::StreamSocket implementation. 52 // net::StreamSocket implementation.
55 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; 53 virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
56 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; 54 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE;
57 virtual void Disconnect() OVERRIDE; 55 virtual void Disconnect() OVERRIDE;
58 virtual bool IsConnected() const OVERRIDE; 56 virtual bool IsConnected() const OVERRIDE;
59 virtual bool IsConnectedAndIdle() const OVERRIDE; 57 virtual bool IsConnectedAndIdle() const OVERRIDE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void AppendInputPacket(const char* data, int data_size); 98 void AppendInputPacket(const char* data, int data_size);
101 int input_pos() const { return input_pos_; } 99 int input_pos() const { return input_pos_; }
102 100
103 // net::Socket implementation. 101 // net::Socket implementation.
104 virtual int Read(net::IOBuffer* buf, int buf_len, 102 virtual int Read(net::IOBuffer* buf, int buf_len,
105 net::OldCompletionCallback* callback) OVERRIDE; 103 net::OldCompletionCallback* callback) OVERRIDE;
106 virtual int Read(net::IOBuffer* buf, int buf_len, 104 virtual int Read(net::IOBuffer* buf, int buf_len,
107 const net::CompletionCallback& callback) OVERRIDE; 105 const net::CompletionCallback& callback) OVERRIDE;
108 virtual int Write(net::IOBuffer* buf, int buf_len, 106 virtual int Write(net::IOBuffer* buf, int buf_len,
109 net::OldCompletionCallback* callback) OVERRIDE; 107 net::OldCompletionCallback* callback) OVERRIDE;
110 virtual int Write(net::IOBuffer* buf, int buf_len,
111 const net::CompletionCallback& callback) OVERRIDE;
112 108
113 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 109 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
114 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 110 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
115 111
116 private: 112 private:
117 bool read_pending_; 113 bool read_pending_;
118 scoped_refptr<net::IOBuffer> read_buffer_; 114 scoped_refptr<net::IOBuffer> read_buffer_;
119 int read_buffer_size_; 115 int read_buffer_size_;
120 net::OldCompletionCallback* old_read_callback_; 116 net::OldCompletionCallback* old_read_callback_;
121 net::CompletionCallback read_callback_; 117 net::CompletionCallback read_callback_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 Session::Error error_; 180 Session::Error error_;
185 bool closed_; 181 bool closed_;
186 182
187 DISALLOW_COPY_AND_ASSIGN(FakeSession); 183 DISALLOW_COPY_AND_ASSIGN(FakeSession);
188 }; 184 };
189 185
190 } // namespace protocol 186 } // namespace protocol
191 } // namespace remoting 187 } // namespace remoting
192 188
193 #endif // REMOTING_PROTOCOL_FAKE_SESSION_H_ 189 #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