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

Issue 10917167: Refactor the P2PSocketDispatcher to be created on the RenderThread instead of the RenderView. (Closed)

Created:
8 years, 3 months ago by perkj_chrome
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Refactor the P2PSocketDispatcher to be created on the RenderThread instead of the RenderView. Removes the use of routing_id. The reason for this refactoring is that we want to be able to create a PeerConnection on the RenderThread instead of the RenderView. PeerConnection is dependent on the P2PSocketDispatcher. PeerConnections are created in renderer_webkitplatformsupport_impl and should not be affilitated with a render view. https://chromiumcodereview.appspot.com/10703095/diff/13017/content/renderer/renderer_webkitplatformsupport_impl.cc BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=156274

Patch Set 1 #

Patch Set 2 : Got unit tests to compile and pass. Added #ifdef to create P2PSocketDispatcher #

Patch Set 3 : Change P2PSocketDispatcher to take the io message loop as input to fix existing unit tests #

Total comments: 1

Patch Set 4 : Removed unnecessary destruction callback. Removed remaining routing_id. #

Total comments: 29

Patch Set 5 : Addressed code review comments from Tommi #

Patch Set 6 : Removed bad comment. #

Total comments: 8

Patch Set 7 : Fixed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -255 lines) Patch
M content/browser/renderer_host/p2p/socket_dispatcher_host.h View 1 2 3 4 2 chunks +7 lines, -15 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_dispatcher_host.cc View 1 2 3 4 5 6 11 chunks +32 lines, -45 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host.h View 3 chunks +2 lines, -3 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host.cc View 2 chunks +5 lines, -8 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.cc View 4 chunks +5 lines, -7 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_server.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_server.cc View 5 chunks +6 lines, -8 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp.cc View 4 chunks +5 lines, -7 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/common/p2p_messages.h View 1 chunk +32 lines, -32 lines 0 comments Download
M content/renderer/media/media_stream_impl.h View 1 2 3 4 3 chunks +1 line, -9 lines 0 comments Download
M content/renderer/media/media_stream_impl.cc View 1 2 3 4 3 chunks +0 lines, -6 lines 0 comments Download
M content/renderer/media/media_stream_impl_unittest.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/p2p/host_address_request.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/p2p/socket_client.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M content/renderer/p2p/socket_dispatcher.h View 1 2 3 4 5 chunks +18 lines, -27 lines 0 comments Download
M content/renderer/p2p/socket_dispatcher.cc View 1 2 3 4 5 4 chunks +37 lines, -53 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 3 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 3 chunks +8 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 3 chunks +0 lines, -9 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 chunks +1 line, -8 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
perkj_chrome
Hi Sergey and Tommi. Would you mind taking a first glimpse on what it would ...
8 years, 3 months ago (2012-09-10 14:30:48 UTC) #1
perkj_chrome
Oops - forgot to actually add Tommi.
8 years, 3 months ago (2012-09-10 15:55:50 UTC) #2
tommi (sloooow) - chröme
This is great! One request below. I'll continue reviewing in a little while. https://chromiumcodereview.appspot.com/10917167/diff/5001/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File ...
8 years, 3 months ago (2012-09-11 09:04:17 UTC) #3
tommi (sloooow) - chröme
https://chromiumcodereview.appspot.com/10917167/diff/4005/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): https://chromiumcodereview.appspot.com/10917167/diff/4005/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode150 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:150: if (it == sockets_.end()) change this to: return (it ...
8 years, 3 months ago (2012-09-11 12:09:09 UTC) #4
perkj_chrome
http://codereview.chromium.org/10917167/diff/4005/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): http://codereview.chromium.org/10917167/diff/4005/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode150 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:150: if (it == sockets_.end()) On 2012/09/11 12:09:09, tommi wrote: ...
8 years, 3 months ago (2012-09-11 14:27:29 UTC) #5
perkj_chrome
Adding Antoine. Antoine, would you mind reviewing the files outside of p2p and media? Thanks
8 years, 3 months ago (2012-09-11 14:34:26 UTC) #6
tommi (sloooow) - chröme
over all this looks pretty good but I'm a bit confused with some of the ...
8 years, 3 months ago (2012-09-11 15:08:58 UTC) #7
perkj_chrome
Yes sorry. New RenderView, RenderThread and MediaStreamImpl changes are due a rebase. http://codereview.chromium.org/10917167/diff/4005/content/renderer/p2p/socket_dispatcher.cc File content/renderer/p2p/socket_dispatcher.cc ...
8 years, 3 months ago (2012-09-11 15:21:56 UTC) #8
piman
LGTM, nice refactoring!
8 years, 3 months ago (2012-09-11 16:11:27 UTC) #9
tommi (sloooow) - chröme
On 2012/09/11 15:21:56, perkj wrote: > Yes sorry. > New RenderView, RenderThread and MediaStreamImpl changes ...
8 years, 3 months ago (2012-09-11 21:50:06 UTC) #10
Sergey Ulanov
LGTM with some style nits. http://codereview.chromium.org/10917167/diff/4035/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): http://codereview.chromium.org/10917167/diff/4035/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode29 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:29: net::HostResolver* host_resolver) nit: now ...
8 years, 3 months ago (2012-09-12 00:57:44 UTC) #11
perkj_chrome
http://codereview.chromium.org/10917167/diff/4035/content/browser/renderer_host/p2p/socket_dispatcher_host.cc File content/browser/renderer_host/p2p/socket_dispatcher_host.cc (right): http://codereview.chromium.org/10917167/diff/4035/content/browser/renderer_host/p2p/socket_dispatcher_host.cc#newcode29 content/browser/renderer_host/p2p/socket_dispatcher_host.cc:29: net::HostResolver* host_resolver) On 2012/09/12 00:57:44, sergeyu wrote: > nit: ...
8 years, 3 months ago (2012-09-12 07:40:59 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/perkj@chromium.org/10917167/7014
8 years, 3 months ago (2012-09-12 07:41:16 UTC) #13
commit-bot: I haz the power
8 years, 3 months ago (2012-09-12 08:30:56 UTC) #14
Try job failure for 10917167-7014 (retry) on android for steps "compile, build"
(clobber build).
It's a second try, previously, steps "compile, build" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android&nu...

Powered by Google App Engine
This is Rietveld 408576698