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

Issue 7276014: DnsQuery: changed raw function pointer to callback. (Closed)

Created:
9 years, 6 months ago by agayev
Modified:
9 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

DnsQuery: changed raw function pointer to callback. BUG=60149 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=90844

Patch Set 1 #

Total comments: 9

Patch Set 2 : Moved RandInt callback to a separate header. #

Patch Set 3 : Got rid of unnecessary vars. #

Patch Set 4 : Misc. #

Patch Set 5 : Fixed header ordering. #

Total comments: 6

Patch Set 6 : Got rid of unnecessary include. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -14 lines) Patch
M net/base/dns_query.h View 1 2 3 4 5 3 chunks +6 lines, -3 lines 0 comments Download
M net/base/dns_query.cc View 1 2 3 4 4 chunks +9 lines, -4 lines 0 comments Download
M net/base/dns_query_unittest.cc View 1 4 chunks +10 lines, -5 lines 0 comments Download
M net/base/dns_response_unittest.cc View 1 2 chunks +5 lines, -2 lines 0 comments Download
A net/base/rand_callback.h View 1 1 chunk +17 lines, -0 lines 0 comments Download
M net/net.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
agayev
brettw, darin: please review base/ change cbentzel, willchan: the rest. I have a few more ...
9 years, 6 months ago (2011-06-27 21:52:30 UTC) #1
brettw
http://codereview.chromium.org/7276014/diff/1/base/rand_util.h File base/rand_util.h (right): http://codereview.chromium.org/7276014/diff/1/base/rand_util.h#newcode23 base/rand_util.h:23: typedef base::Callback<int(int, int)> RandIntCallback; I don't understand why this ...
9 years, 6 months ago (2011-06-27 22:24:48 UTC) #2
agayev
http://codereview.chromium.org/7276014/diff/1/base/rand_util.h File base/rand_util.h (right): http://codereview.chromium.org/7276014/diff/1/base/rand_util.h#newcode23 base/rand_util.h:23: typedef base::Callback<int(int, int)> RandIntCallback; On 2011/06/27 22:24:48, brettw wrote: ...
9 years, 6 months ago (2011-06-27 23:53:52 UTC) #3
willchan no longer on Chromium
http://codereview.chromium.org/7276014/diff/1/base/rand_util.h File base/rand_util.h (right): http://codereview.chromium.org/7276014/diff/1/base/rand_util.h#newcode23 base/rand_util.h:23: typedef base::Callback<int(int, int)> RandIntCallback; On 2011/06/27 23:53:52, agayev wrote: ...
9 years, 6 months ago (2011-06-28 09:58:23 UTC) #4
cbentzel
Could you add a net/base/random_callback.h which the DNS related headers include? On Tue, Jun 28, ...
9 years, 6 months ago (2011-06-28 10:03:42 UTC) #5
agayev
cbentzel: another client of RandInt callback is going to be UDP socket. Can it still ...
9 years, 5 months ago (2011-06-28 14:37:23 UTC) #6
willchan no longer on Chromium
On Tue, Jun 28, 2011 at 5:37 PM, <agayev@chromium.org> wrote: > cbentzel: another client of ...
9 years, 5 months ago (2011-06-28 14:39:21 UTC) #7
agayev
On 2011/06/28 14:39:21, willchan wrote: > On Tue, Jun 28, 2011 at 5:37 PM, <mailto:agayev@chromium.org> ...
9 years, 5 months ago (2011-06-28 14:59:11 UTC) #8
brettw
http://codereview.chromium.org/7276014/diff/1/base/rand_util.h File base/rand_util.h (right): http://codereview.chromium.org/7276014/diff/1/base/rand_util.h#newcode23 base/rand_util.h:23: typedef base::Callback<int(int, int)> RandIntCallback; I might define it at ...
9 years, 5 months ago (2011-06-28 16:09:51 UTC) #9
agayev
http://codereview.chromium.org/7276014/diff/1/base/rand_util.h File base/rand_util.h (right): http://codereview.chromium.org/7276014/diff/1/base/rand_util.h#newcode23 base/rand_util.h:23: typedef base::Callback<int(int, int)> RandIntCallback; On 2011/06/28 16:09:52, brettw wrote: ...
9 years, 5 months ago (2011-06-28 16:22:20 UTC) #10
cbentzel
LGTM http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.h File net/base/dns_query.h (right): http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.h#newcode11 net/base/dns_query.h:11: #include "base/rand_util.h" You don't need this include anymore
9 years, 5 months ago (2011-06-28 19:08:18 UTC) #11
willchan no longer on Chromium
LGTM http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc File net/base/dns_query.cc (right): http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc#newcode62 net/base/dns_query.cc:62: DnsQuery::DnsQuery(const DnsQuery& rhs) I just happened to notice ...
9 years, 5 months ago (2011-06-28 19:10:47 UTC) #12
agayev
http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc File net/base/dns_query.cc (right): http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc#newcode62 net/base/dns_query.cc:62: DnsQuery::DnsQuery(const DnsQuery& rhs) On 2011/06/28 19:10:47, willchan wrote: > ...
9 years, 5 months ago (2011-06-28 19:49:55 UTC) #13
willchan no longer on Chromium
9 years, 5 months ago (2011-06-28 20:06:42 UTC) #14
http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc
File net/base/dns_query.cc (right):

http://codereview.chromium.org/7276014/diff/1006/net/base/dns_query.cc#newcode62
net/base/dns_query.cc:62: DnsQuery::DnsQuery(const DnsQuery& rhs)
On 2011/06/28 19:49:55, agayev wrote:
> On 2011/06/28 19:10:47, willchan wrote:
> > I just happened to notice this. Copy constructors are frowned upon in the
> Google
> > Style Guide. Not going to block this change, and perhaps you've evaluated
the
> > pros and cons already, but I'd advise using a Copy() or CopyFrom() instead.
> 
> I wasn't aware of that, although this copy constructor is private, cannot be
> accidentally invoked, I've also declared an assignment operator so this is
just
> like DISALLOW_COPY_AND_ASSIGN.
> 
> Anyway, I will just change CloneWithNewId to do whole cloning operation in a
> followup CL, given that it does not change the interface, and add an explicit
> DISALLOW_COPY_AND_ASSIGN to be consistent with the rest, since I really need
> this to go in for my work to continue.

Yeah, a followup CL would be great. No need to block this one, I hope I
mentioned that earlier.

Powered by Google App Engine
This is Rietveld 408576698