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

Unified Diff: remoting/protocol/fake_datagram_socket.h

Issue 1197853003: Add P2PDatagramSocket and P2PStreamSocket interfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: remoting/protocol/fake_datagram_socket.h
diff --git a/remoting/protocol/fake_datagram_socket.h b/remoting/protocol/fake_datagram_socket.h
index 9669c0bd01cccc2be970dbe21b46bee6c1edfb32..d076ca52d3006e8281901ec8daeff9386a03072d 100644
--- a/remoting/protocol/fake_datagram_socket.h
+++ b/remoting/protocol/fake_datagram_socket.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "net/base/completion_callback.h"
-#include "net/socket/socket.h"
#include "remoting/protocol/datagram_channel_factory.h"
+#include "remoting/protocol/p2p_socket.h"
namespace base {
class SingleThreadTaskRunner;
@@ -22,7 +22,7 @@ class SingleThreadTaskRunner;
namespace remoting {
namespace protocol {
-// FakeDatagramSocket implement net::StreamSocket interface. All data written to
+// FakeDatagramSocket implement P2PStreamSocket interface. All data written to
// FakeDatagramSocket is stored in a buffer returned by written_packets().
// Read() reads data from another buffer that can be set with
// AppendInputPacket(). Pending reads are supported, so if there is a pending
@@ -32,7 +32,7 @@ namespace protocol {
// PairWith() method, e.g.: a->PairWith(b). After this all data
// written to |a| can be read from |b| and vice versa. Two connected
// sockets |a| and |b| must be created and used on the same thread.
-class FakeDatagramSocket : public net::Socket {
+class FakeDatagramSocket : public P2PDatagramSocket {
public:
FakeDatagramSocket();
~FakeDatagramSocket() override;
@@ -53,7 +53,7 @@ class FakeDatagramSocket : public net::Socket {
base::WeakPtr<FakeDatagramSocket> GetWeakPtr();
- // net::Socket implementation.
+ // P2PDatagramSocket implementation.
int Read(net::IOBuffer* buf,
int buf_len,
const net::CompletionCallback& callback) override;

Powered by Google App Engine
This is Rietveld 408576698