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

Issue 7605018: Simplify channel creation callbacks in remoting::Session interface. (Closed)

Created:
9 years, 4 months ago by Sergey Ulanov
Modified:
9 years, 4 months ago
Reviewers:
Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, Paweł Hajdan Jr., dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Simplify channel creation callbacks in remoting::Session interface. Remove name parameters from StreamChannelCallback and DatagramChannelCallback. This argument is redundant: callback currying can be used instead where neccessary. BUG=None TEST=compiles. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96310

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -64 lines) Patch
M remoting/protocol/fake_session.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M remoting/protocol/jingle_datagram_connector.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/jingle_session.h View 1 chunk +2 lines, -3 lines 0 comments Download
M remoting/protocol/jingle_session.cc View 1 chunk +16 lines, -23 lines 0 comments Download
M remoting/protocol/jingle_session_unittest.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M remoting/protocol/jingle_stream_connector.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/protobuf_video_reader.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/protobuf_video_reader.cc View 1 chunk +1 line, -3 lines 0 comments Download
M remoting/protocol/protobuf_video_writer.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/protobuf_video_writer.cc View 1 chunk +1 line, -3 lines 0 comments Download
M remoting/protocol/rtp_video_reader.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/rtp_video_reader.cc View 2 chunks +7 lines, -8 lines 3 comments Download
M remoting/protocol/rtp_video_writer.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/rtp_video_writer.cc View 2 chunks +7 lines, -6 lines 0 comments Download
M remoting/protocol/session.h View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Sergey Ulanov
9 years, 4 months ago (2011-08-09 23:30:25 UTC) #1
Wez
On the face of it this looks reasonable, but it introduces a load of callback-currying ...
9 years, 4 months ago (2011-08-09 23:42:35 UTC) #2
Sergey Ulanov
> On the face of it this looks reasonable, but it introduces > a load ...
9 years, 4 months ago (2011-08-10 00:00:43 UTC) #3
Wez
9 years, 4 months ago (2011-08-10 00:37:13 UTC) #4
OK, LGTM

http://codereview.chromium.org/7605018/diff/1/remoting/protocol/rtp_video_rea...
File remoting/protocol/rtp_video_reader.cc (right):

http://codereview.chromium.org/7605018/diff/1/remoting/protocol/rtp_video_rea...
remoting/protocol/rtp_video_reader.cc:52: void
RtpVideoReader::OnChannelReady(bool rtp, net::Socket* socket) {
On 2011/08/10 00:00:43, sergeyu wrote:
> On 2011/08/09 23:42:35, Wez wrote:
> > Why have an |rtp| bool here, rather than the container scheme you used
> > elsewhere?
> 
> because we also need to initialized |rtp_reader_| and |rtcp_writer_| here.

Yes, but that could be managed with:
  if (socket == rtp_channel_get())
after the "container" has been set. :)

Powered by Google App Engine
This is Rietveld 408576698