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

Side by Side Diff: jingle/notifier/base/chrome_async_socket.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 | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | jingle/notifier/base/chrome_async_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) 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 // An implementation of buzz::AsyncSocket that uses Chrome sockets. 5 // An implementation of buzz::AsyncSocket that uses Chrome sockets.
6 6
7 #ifndef JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_ 7 #ifndef JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_
8 #define JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_ 8 #define JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_
9 9
10 #if !defined(FEATURE_ENABLE_SSL) 10 #if !defined(FEATURE_ENABLE_SSL)
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void PostDoWrite(); 169 void PostDoWrite();
170 void DoWrite(); 170 void DoWrite();
171 void ProcessWriteDone(int status); 171 void ProcessWriteDone(int status);
172 172
173 // SSL/TLS connection functions. 173 // SSL/TLS connection functions.
174 void ProcessSSLConnectDone(int status); 174 void ProcessSSLConnectDone(int status);
175 175
176 // Close functions. 176 // Close functions.
177 void DoClose(); 177 void DoClose();
178 178
179 // Callbacks passed to |transport_socket_|.
180 net::OldCompletionCallbackImpl<ChromeAsyncSocket> connect_callback_;
181 net::OldCompletionCallbackImpl<ChromeAsyncSocket> read_callback_;
182 net::OldCompletionCallbackImpl<ChromeAsyncSocket> write_callback_;
183 net::OldCompletionCallbackImpl<ChromeAsyncSocket> ssl_connect_callback_;
184
185 scoped_ptr<ResolvingClientSocketFactory> client_socket_factory_; 179 scoped_ptr<ResolvingClientSocketFactory> client_socket_factory_;
186 180
187 // buzz::AsyncSocket state. 181 // buzz::AsyncSocket state.
188 buzz::AsyncSocket::State state_; 182 buzz::AsyncSocket::State state_;
189 buzz::AsyncSocket::Error error_; 183 buzz::AsyncSocket::Error error_;
190 net::Error net_error_; 184 net::Error net_error_;
191 185
192 // Used by read/write loops. 186 // Used by read/write loops.
193 base::WeakPtrFactory<ChromeAsyncSocket> weak_factory_; 187 base::WeakPtrFactory<ChromeAsyncSocket> weak_factory_;
194 188
(...skipping 15 matching lines...) Expand all
210 AsyncIOState write_state_; 204 AsyncIOState write_state_;
211 scoped_refptr<net::IOBufferWithSize> write_buf_; 205 scoped_refptr<net::IOBufferWithSize> write_buf_;
212 size_t write_end_; 206 size_t write_end_;
213 207
214 DISALLOW_COPY_AND_ASSIGN(ChromeAsyncSocket); 208 DISALLOW_COPY_AND_ASSIGN(ChromeAsyncSocket);
215 }; 209 };
216 210
217 } // namespace notifier 211 } // namespace notifier
218 212
219 #endif // JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_ 213 #endif // JINGLE_NOTIFIER_BASE_CHROME_ASYNC_SOCKET_H_
OLDNEW
« no previous file with comments | « jingle/glue/pseudotcp_adapter_unittest.cc ('k') | jingle/notifier/base/chrome_async_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698