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

Unified Diff: remoting/protocol/buffered_socket_writer.h

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 months 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 | « remoting/jingle_glue/jingle_thread.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/buffered_socket_writer.h
diff --git a/remoting/protocol/buffered_socket_writer.h b/remoting/protocol/buffered_socket_writer.h
index 3bb03d344e724681e8bd0a1d847ff2f75cafcf58..424c4dc181abef3a8e8313f5c44029a7d0a216f7 100644
--- a/remoting/protocol/buffered_socket_writer.h
+++ b/remoting/protocol/buffered_socket_writer.h
@@ -12,9 +12,12 @@
#include "net/base/io_buffer.h"
#include "net/socket/socket.h"
-class MessageLoop;
class Task;
+namespace base {
+class MessageLoopProxy;
+} // namespace base
+
namespace net {
class Socket;
} // namespace net
@@ -36,7 +39,7 @@ class BufferedSocketWriterBase
public:
typedef Callback1<int>::Type WriteFailedCallback;
- explicit BufferedSocketWriterBase();
+ explicit BufferedSocketWriterBase(base::MessageLoopProxy* message_loop);
virtual ~BufferedSocketWriterBase();
// Initializes the writer. Must be called on the thread that will be used
@@ -91,7 +94,7 @@ class BufferedSocketWriterBase
base::Lock lock_;
net::Socket* socket_;
- MessageLoop* message_loop_;
+ scoped_refptr<base::MessageLoopProxy> message_loop_;
scoped_ptr<WriteFailedCallback> write_failed_callback_;
bool write_pending_;
@@ -103,7 +106,7 @@ class BufferedSocketWriterBase
class BufferedSocketWriter : public BufferedSocketWriterBase {
public:
- BufferedSocketWriter();
+ BufferedSocketWriter(base::MessageLoopProxy* message_loop);
virtual ~BufferedSocketWriter();
protected:
@@ -117,7 +120,7 @@ class BufferedSocketWriter : public BufferedSocketWriterBase {
class BufferedDatagramWriter : public BufferedSocketWriterBase {
public:
- BufferedDatagramWriter();
+ BufferedDatagramWriter(base::MessageLoopProxy* message_loop);
virtual ~BufferedDatagramWriter();
protected:
« no previous file with comments | « remoting/jingle_glue/jingle_thread.cc ('k') | remoting/protocol/buffered_socket_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698