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

Issue 8432009: Refactor IqRequest. (Closed)

Created:
9 years, 1 month ago by Sergey Ulanov
Modified:
9 years, 1 month 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

Refactor IqRequest. Remove CreateIqRequest from SignalStrategy interface. Intead to send an Iq stanza the new IqSender now need to be used. IqSender creats of IqRequest objects and handling iq responses. BUG=None TEST=Unittests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108606

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : - #

Patch Set 4 : - #

Total comments: 38

Patch Set 5 : - #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -456 lines) Patch
M remoting/host/heartbeat_sender.h View 2 chunks +8 lines, -3 lines 0 comments Download
M remoting/host/heartbeat_sender.cc View 1 2 3 4 4 chunks +9 lines, -7 lines 0 comments Download
M remoting/host/heartbeat_sender_unittest.cc View 1 2 3 5 chunks +15 lines, -15 lines 0 comments Download
M remoting/host/register_support_host_request.h View 2 chunks +2 lines, -0 lines 0 comments Download
M remoting/host/register_support_host_request.cc View 1 2 3 4 4 chunks +11 lines, -8 lines 0 comments Download
M remoting/host/register_support_host_request_unittest.cc View 5 chunks +15 lines, -12 lines 0 comments Download
M remoting/jingle_glue/fake_signal_strategy.h View 3 chunks +5 lines, -6 lines 0 comments Download
M remoting/jingle_glue/fake_signal_strategy.cc View 5 chunks +20 lines, -17 lines 0 comments Download
D remoting/jingle_glue/iq_request.h View 1 chunk +0 lines, -94 lines 0 comments Download
D remoting/jingle_glue/iq_request.cc View 1 chunk +0 lines, -114 lines 0 comments Download
D remoting/jingle_glue/iq_request_unittest.cc View 1 chunk +0 lines, -40 lines 0 comments Download
A remoting/jingle_glue/iq_sender.h View 1 2 3 4 1 chunk +90 lines, -0 lines 2 comments Download
A remoting/jingle_glue/iq_sender.cc View 1 2 3 4 1 chunk +109 lines, -0 lines 0 comments Download
A remoting/jingle_glue/iq_sender_unittest.cc View 1 2 3 4 1 chunk +91 lines, -0 lines 0 comments Download
M remoting/jingle_glue/javascript_signal_strategy.h View 3 chunks +6 lines, -6 lines 0 comments Download
M remoting/jingle_glue/javascript_signal_strategy.cc View 1 2 3 4 3 chunks +22 lines, -21 lines 0 comments Download
M remoting/jingle_glue/jingle_info_request.h View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M remoting/jingle_glue/jingle_info_request.cc View 1 2 3 4 2 chunks +8 lines, -9 lines 0 comments Download
M remoting/jingle_glue/jingle_signaling_connector.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M remoting/jingle_glue/mock_objects.h View 2 chunks +4 lines, -29 lines 0 comments Download
M remoting/jingle_glue/mock_objects.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M remoting/jingle_glue/signal_strategy.h View 1 2 3 4 2 chunks +7 lines, -12 lines 0 comments Download
M remoting/jingle_glue/xmpp_signal_strategy.h View 3 chunks +6 lines, -6 lines 0 comments Download
M remoting/jingle_glue/xmpp_signal_strategy.cc View 1 4 chunks +25 lines, -19 lines 0 comments Download
M remoting/protocol/jingle_session_manager.cc View 1 chunk +1 line, -2 lines 0 comments Download
M remoting/protocol/pepper_session.cc View 4 chunks +10 lines, -10 lines 0 comments Download
M remoting/protocol/pepper_session_manager.h View 3 chunks +3 lines, -1 line 0 comments Download
M remoting/protocol/pepper_session_manager.cc View 4 chunks +7 lines, -10 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Sergey Ulanov
9 years, 1 month ago (2011-10-31 19:14:44 UTC) #1
Sergey Ulanov
ping
9 years, 1 month ago (2011-11-03 01:36:32 UTC) #2
Wez
http://codereview.chromium.org/8432009/diff/5001/remoting/host/heartbeat_sender.h File remoting/host/heartbeat_sender.h (right): http://codereview.chromium.org/8432009/diff/5001/remoting/host/heartbeat_sender.h#newcode16 remoting/host/heartbeat_sender.h:16: #include "base/gtest_prod_util.h" Why do we need this? http://codereview.chromium.org/8432009/diff/5001/remoting/jingle_glue/iq_sender.cc File ...
9 years, 1 month ago (2011-11-03 02:09:30 UTC) #3
Sergey Ulanov
http://codereview.chromium.org/8432009/diff/5001/remoting/host/heartbeat_sender.h File remoting/host/heartbeat_sender.h (right): http://codereview.chromium.org/8432009/diff/5001/remoting/host/heartbeat_sender.h#newcode16 remoting/host/heartbeat_sender.h:16: #include "base/gtest_prod_util.h" On 2011/11/03 02:09:30, Wez wrote: > Why ...
9 years, 1 month ago (2011-11-03 02:41:31 UTC) #4
Wez
I think you still need to upload the latest version of the patch? http://codereview.chromium.org/8432009/diff/5001/remoting/jingle_glue/iq_sender.h File ...
9 years, 1 month ago (2011-11-03 17:09:05 UTC) #5
Sergey Ulanov
> I think you still need to upload the latest version of the patch? Sorry. ...
9 years, 1 month ago (2011-11-03 17:55:59 UTC) #6
Wez
LGTM, with one style-guide nit. http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h File remoting/jingle_glue/iq_sender.h (right): http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h#newcode47 remoting/jingle_glue/iq_sender.h:47: const ReplyCallback& callback); Overloads ...
9 years, 1 month ago (2011-11-03 20:29:19 UTC) #7
Sergey Ulanov
http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h File remoting/jingle_glue/iq_sender.h (right): http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h#newcode47 remoting/jingle_glue/iq_sender.h:47: const ReplyCallback& callback); On 2011/11/03 20:29:19, Wez wrote: > ...
9 years, 1 month ago (2011-11-03 20:52:12 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sergeyu@chromium.org/8432009/9033
9 years, 1 month ago (2011-11-03 23:37:45 UTC) #9
Wez
On 2011/11/03 20:52:12, sergeyu wrote: > http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h > File remoting/jingle_glue/iq_sender.h (right): > > http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_sender.h#newcode47 > ...
9 years, 1 month ago (2011-11-03 23:50:39 UTC) #10
commit-bot: I haz the power
Change committed as 108606
9 years, 1 month ago (2011-11-04 01:00:51 UTC) #11
Sergey Ulanov
9 years, 1 month ago (2011-11-04 02:11:33 UTC) #12
On 2011/11/03 23:50:39, Wez wrote:
> On 2011/11/03 20:52:12, sergeyu wrote:
> >
>
http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_send...
> > File remoting/jingle_glue/iq_sender.h (right):
> > 
> >
>
http://codereview.chromium.org/8432009/diff/9033/remoting/jingle_glue/iq_send...
> > remoting/jingle_glue/iq_sender.h:47: const ReplyCallback& callback);
> > On 2011/11/03 20:29:19, Wez wrote:
> > > Overloads make style pixie cry.
> > 
> > I think this is a case when function overload is acceptable, though I can
> rename
> > it if you disagree.
> 
> I'd say this was one of the cases where it's not acceptable, because the
> overload do different things - one sends the stanza and the other modifies it
> with supplied fields, then sends it. 

It doesn't modify the message, it creates the message and sends it. You can look
at it as a different way to specify the stanza: each stanza is essentially a
union of stanza type, receiver jid and stanza body. First overload accepts it as
one parameter, second one - as three separate parameters that when combined
create the stanza.

> The style-guide examples of acceptable
> overloads are functionally equivalent, but accept different parameter types.

Here the two methods do the same thing, they just accept the stanza differently.

> If  we can think of a good name for it then we can rename it in a follow-up
CL.

Powered by Google App Engine
This is Rietveld 408576698