Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(40)

Issue 1197853003: Add P2PDatagramSocket and P2PStreamSocket interfaces. (Closed)

Created:
4 years, 5 months ago by Sergey Ulanov
Modified:
4 years, 4 months ago
Reviewers:
Wez
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add P2PDatagramSocket and P2PStreamSocket interfaces. Previously remoting code was using net::Socket and net::StreamSocket for datagram and stream socket. Problem is that net::StreamSocket interface contains a lot of methods that are not relevant for peer-to-peer connections in remoting. Added P2PDatagramSocket and P2PStreamSocket interfaces independent of net::Socket. This allowed to remove a lot of the redundant code needed for net::StreamSocket implementations. There are two new adapters required in SslHmacChannelAuthenticator for the SSL layer, but these won't be necessary after we migrate to QUIC. Committed: https://crrev.com/aa22c0858c81fe75f72c1706cf052af85a82b364 Cr-Commit-Position: refs/heads/master@{#339489}

Patch Set 1 #

Total comments: 16

Patch Set 2 : #

Patch Set 3 : #

Total comments: 8

Patch Set 4 : #

Patch Set 5 : #

Total comments: 16

Patch Set 6 : #

Total comments: 13

Patch Set 7 : #

Patch Set 8 : revert buffered_socket_writer to patchset 6 #

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+600 lines, -881 lines) Patch
M remoting/base/buffered_socket_writer.h View 1 2 3 4 5 6 8 2 chunks +32 lines, -79 lines 0 comments Download
M remoting/base/buffered_socket_writer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +78 lines, -166 lines 0 comments Download
M remoting/base/buffered_socket_writer_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -5 lines 0 comments Download
M remoting/client/key_event_mapper_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M remoting/protocol/authenticator_test_base.h View 4 chunks +5 lines, -8 lines 0 comments Download
M remoting/protocol/authenticator_test_base.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M remoting/protocol/channel_authenticator.h View 2 chunks +4 lines, -6 lines 0 comments Download
M remoting/protocol/channel_dispatcher_base.h View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M remoting/protocol/channel_dispatcher_base.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M remoting/protocol/channel_multiplexer.h View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/channel_multiplexer.cc View 1 2 3 13 chunks +17 lines, -72 lines 0 comments Download
M remoting/protocol/channel_multiplexer_unittest.cc View 7 chunks +28 lines, -28 lines 0 comments Download
M remoting/protocol/channel_socket_adapter.h View 1 2 3 3 chunks +9 lines, -14 lines 0 comments Download
M remoting/protocol/channel_socket_adapter.cc View 1 2 3 3 chunks +4 lines, -18 lines 0 comments Download
M remoting/protocol/channel_socket_adapter_unittest.cc View 1 3 chunks +10 lines, -10 lines 0 comments Download
M remoting/protocol/client_video_dispatcher_unittest.cc View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M remoting/protocol/connection_tester.h View 4 chunks +11 lines, -10 lines 0 comments Download
M remoting/protocol/connection_tester.cc View 1 2 4 chunks +14 lines, -14 lines 0 comments Download
M remoting/protocol/datagram_channel_factory.h View 1 chunk +3 lines, -5 lines 0 comments Download
M remoting/protocol/fake_authenticator.h View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/fake_authenticator.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/fake_datagram_socket.h View 1 2 3 5 chunks +9 lines, -13 lines 0 comments Download
M remoting/protocol/fake_datagram_socket.cc View 1 2 3 3 chunks +8 lines, -16 lines 0 comments Download
M remoting/protocol/fake_stream_socket.h View 1 2 3 5 chunks +8 lines, -34 lines 0 comments Download
M remoting/protocol/fake_stream_socket.cc View 1 2 3 6 chunks +14 lines, -109 lines 0 comments Download
M remoting/protocol/jingle_session.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M remoting/protocol/jingle_session_unittest.cc View 1 2 4 chunks +6 lines, -5 lines 0 comments Download
M remoting/protocol/libjingle_transport_factory.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/message_reader.h View 3 chunks +4 lines, -3 lines 0 comments Download
M remoting/protocol/message_reader.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
A remoting/protocol/p2p_datagram_socket.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A remoting/protocol/p2p_stream_socket.h View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
M remoting/protocol/pseudotcp_adapter.h View 1 2 3 1 chunk +19 lines, -35 lines 0 comments Download
M remoting/protocol/pseudotcp_adapter.cc View 1 2 3 12 chunks +28 lines, -128 lines 0 comments Download
M remoting/protocol/pseudotcp_adapter_unittest.cc View 1 2 3 7 chunks +11 lines, -20 lines 0 comments Download
M remoting/protocol/pseudotcp_channel_factory.h View 2 chunks +3 lines, -2 lines 0 comments Download
M remoting/protocol/pseudotcp_channel_factory.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M remoting/protocol/secure_channel_factory.h View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/secure_channel_factory.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator.cc View 1 2 3 6 chunks +112 lines, -9 lines 0 comments Download
M remoting/protocol/ssl_hmac_channel_authenticator_unittest.cc View 1 2 5 chunks +6 lines, -5 lines 0 comments Download
M remoting/protocol/stream_channel_factory.h View 1 chunk +3 lines, -6 lines 0 comments Download
M remoting/protocol/transport.h View 3 chunks +10 lines, -15 lines 0 comments Download
M remoting/remoting_srcs.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/remoting_test.gypi View 1 1 chunk +0 lines, -2 lines 0 comments Download
M remoting/signaling/xmpp_signal_strategy.cc View 1 2 3 2 chunks +4 lines, -6 lines 0 comments Download

Messages

Total messages: 35 (7 generated)
Sergey Ulanov
4 years, 5 months ago (2015-06-19 21:07:31 UTC) #2
Wez
Is there any value in having them inherit from net::Socket? Fundamentally datagram and stream sockets ...
4 years, 5 months ago (2015-06-20 00:14:23 UTC) #3
Wez
https://codereview.chromium.org/1197853003/diff/1/remoting/protocol/authenticator_test_base.cc File remoting/protocol/authenticator_test_base.cc (right): https://codereview.chromium.org/1197853003/diff/1/remoting/protocol/authenticator_test_base.cc#newcode17 remoting/protocol/authenticator_test_base.cc:17: #include "remoting/protocol/fake_stream_socket.h" nit: include p2p_socket.h header, since I think ...
4 years, 5 months ago (2015-06-22 15:49:07 UTC) #4
Sergey Ulanov
https://codereview.chromium.org/1197853003/diff/1/remoting/protocol/authenticator_test_base.cc File remoting/protocol/authenticator_test_base.cc (right): https://codereview.chromium.org/1197853003/diff/1/remoting/protocol/authenticator_test_base.cc#newcode17 remoting/protocol/authenticator_test_base.cc:17: #include "remoting/protocol/fake_stream_socket.h" On 2015/06/22 15:49:06, Wez wrote: > nit: ...
4 years, 4 months ago (2015-07-10 00:49:55 UTC) #5
Wez
https://codereview.chromium.org/1197853003/diff/40001/remoting/base/buffered_socket_writer.h File remoting/base/buffered_socket_writer.h (right): https://codereview.chromium.org/1197853003/diff/40001/remoting/base/buffered_socket_writer.h#newcode45 remoting/base/buffered_socket_writer.h:45: const base::Closure& done_task); Not necessarily for this CL, but ...
4 years, 4 months ago (2015-07-10 01:18:24 UTC) #6
Sergey Ulanov
https://codereview.chromium.org/1197853003/diff/40001/remoting/base/buffered_socket_writer.h File remoting/base/buffered_socket_writer.h (right): https://codereview.chromium.org/1197853003/diff/40001/remoting/base/buffered_socket_writer.h#newcode45 remoting/base/buffered_socket_writer.h:45: const base::Closure& done_task); On 2015/07/10 01:18:24, Wez wrote: > ...
4 years, 4 months ago (2015-07-10 20:48:57 UTC) #7
Sergey Ulanov
ping
4 years, 4 months ago (2015-07-14 16:13:55 UTC) #8
Wez
nit: Can you reformat the CL description to more readable - the big chunk of ...
4 years, 4 months ago (2015-07-14 17:12:53 UTC) #9
Wez
https://codereview.chromium.org/1197853003/diff/40001/remoting/protocol/p2p_datagram_socket.h File remoting/protocol/p2p_datagram_socket.h (right): https://codereview.chromium.org/1197853003/diff/40001/remoting/protocol/p2p_datagram_socket.h#newcode29 remoting/protocol/p2p_datagram_socket.h:29: // completes, the callback will not be invoked. On ...
4 years, 4 months ago (2015-07-14 18:28:09 UTC) #10
Sergey Ulanov
https://codereview.chromium.org/1197853003/diff/40001/remoting/protocol/p2p_datagram_socket.h File remoting/protocol/p2p_datagram_socket.h (right): https://codereview.chromium.org/1197853003/diff/40001/remoting/protocol/p2p_datagram_socket.h#newcode29 remoting/protocol/p2p_datagram_socket.h:29: // completes, the callback will not be invoked. On ...
4 years, 4 months ago (2015-07-14 21:07:54 UTC) #11
Wez
Did you mean to upload a new patch-set?
4 years, 4 months ago (2015-07-14 21:14:03 UTC) #12
Sergey Ulanov
I did. A minute later after posting the reply. Sorry. On Tue, Jul 14, 2015 ...
4 years, 4 months ago (2015-07-14 21:16:04 UTC) #13
Wez
https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc File remoting/base/buffered_socket_writer.cc (right): https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc#newcode139 remoting/base/buffered_socket_writer.cc:139: weak_factory_.GetWeakPtr())); Now that you're using WeakPtr you don't even ...
4 years, 4 months ago (2015-07-14 21:49:20 UTC) #14
Sergey Ulanov
https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc File remoting/base/buffered_socket_writer.cc (right): https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc#newcode139 remoting/base/buffered_socket_writer.cc:139: weak_factory_.GetWeakPtr())); On 2015/07/14 21:49:20, Wez wrote: > Now that ...
4 years, 4 months ago (2015-07-14 22:53:21 UTC) #15
Sergey Ulanov
ping
4 years, 4 months ago (2015-07-16 16:40:05 UTC) #16
Wez
https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc File remoting/base/buffered_socket_writer.cc (right): https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc#newcode139 remoting/base/buffered_socket_writer.cc:139: weak_factory_.GetWeakPtr())); On 2015/07/14 22:53:20, Sergey Ulanov wrote: > On ...
4 years, 4 months ago (2015-07-16 21:55:36 UTC) #17
Sergey Ulanov
https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc File remoting/base/buffered_socket_writer.cc (right): https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc#newcode139 remoting/base/buffered_socket_writer.cc:139: weak_factory_.GetWeakPtr())); On 2015/07/16 21:55:36, Wez wrote: > On 2015/07/14 ...
4 years, 4 months ago (2015-07-16 22:11:03 UTC) #18
Sergey Ulanov
I've reverted BufferedSocketWriter to what it was in patchset 6. Cleaning up BufferedSocketWriter isn't a ...
4 years, 4 months ago (2015-07-16 22:25:57 UTC) #19
Wez
On 2015/07/16 22:11:03, Sergey Ulanov wrote: > https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc > File remoting/base/buffered_socket_writer.cc (right): > > https://codereview.chromium.org/1197853003/diff/100001/remoting/base/buffered_socket_writer.cc#newcode139 ...
4 years, 4 months ago (2015-07-16 22:28:35 UTC) #20
Sergey Ulanov
I've uploaded a new version that uses weak_ptr, but HandleWriteResult() doesn't return anything. If you ...
4 years, 4 months ago (2015-07-16 22:52:32 UTC) #21
Wez
Yes, you're right; apologise for ratholing this CL... LGTM!
4 years, 4 months ago (2015-07-16 23:00:28 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853003/160001
4 years, 4 months ago (2015-07-16 23:04:14 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/74487)
4 years, 4 months ago (2015-07-17 00:04:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853003/160001
4 years, 4 months ago (2015-07-17 00:09:57 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/29041)
4 years, 4 months ago (2015-07-17 01:07:11 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853003/180001
4 years, 4 months ago (2015-07-20 17:46:02 UTC) #33
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 4 months ago (2015-07-20 19:41:21 UTC) #34
commit-bot: I haz the power
4 years, 4 months ago (2015-07-20 19:42:43 UTC) #35
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/aa22c0858c81fe75f72c1706cf052af85a82b364
Cr-Commit-Position: refs/heads/master@{#339489}

Powered by Google App Engine
This is Rietveld 408576698