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

Unified Diff: jingle/glue/channel_socket_adapter.h

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_test_utils.h ('k') | jingle/glue/channel_socket_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/channel_socket_adapter.h
diff --git a/jingle/glue/channel_socket_adapter.h b/jingle/glue/channel_socket_adapter.h
index 43a63f0052b8623a723c13a6dac60041a4f8436c..1f367e8d634af3b11f5ef04f1e646cba38530459 100644
--- a/jingle/glue/channel_socket_adapter.h
+++ b/jingle/glue/channel_socket_adapter.h
@@ -6,6 +6,7 @@
#define JINGLE_GLUE_CHANNEL_SOCKET_ADAPTER_H_
#include "base/compiler_specific.h"
+#include "net/base/completion_callback.h"
#include "net/socket/socket.h"
#include "third_party/libjingle/source/talk/base/socketaddress.h"
#include "third_party/libjingle/source/talk/base/sigslot.h"
@@ -33,9 +34,11 @@ class TransportChannelSocketAdapter : public net::Socket,
// Must be called before the session and the channel are destroyed.
void Close(int error_code);
- // Socket interface.
+ // Socket implementation.
virtual int Read(net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* callback) OVERRIDE;
+ virtual int Read(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) OVERRIDE;
virtual int Write(net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* callback) OVERRIDE;
@@ -52,7 +55,8 @@ class TransportChannelSocketAdapter : public net::Socket,
cricket::TransportChannel* channel_;
- net::OldCompletionCallback* read_callback_; // Not owned.
+ net::OldCompletionCallback* old_read_callback_; // Not owned.
+ net::CompletionCallback read_callback_;
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_test_utils.h ('k') | jingle/glue/channel_socket_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698