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

Issue 6598040: Add constructor for creating an AddressList from a struct sockaddr. This is... (Closed)

Created:
9 years, 9 months ago by Mike Belshe
Modified:
9 years, 5 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add constructor for creating an AddressList from a struct sockaddr. This is preliminary work for using UDP, where we're going to use recvfrom(), which receives a sockaddr from the network call, and we want to turn that into an AddressList which is more usable for the app. BUG=none TEST=AddressFromAddressInfo Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76489

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 9

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -0 lines) Patch
M net/base/address_list.h View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M net/base/address_list.cc View 1 2 3 4 5 1 chunk +44 lines, -0 lines 0 comments Download
M net/base/address_list_unittest.cc View 1 2 3 4 5 2 chunks +41 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Mike Belshe
9 years, 9 months ago (2011-02-28 19:24:18 UTC) #1
eroman
http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.cc File net/base/address_list.cc (right): http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.cc#newcode262 net/base/address_list.cc:262: return NULL; under what circumstance is this valid? Seems ...
9 years, 9 months ago (2011-03-01 02:52:33 UTC) #2
eroman
(didnt publish this before it seems) http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.h File net/base/address_list.h (right): http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.h#newcode33 net/base/address_list.h:33: AddressList(struct sockaddr* address, ...
9 years, 9 months ago (2011-03-01 02:53:09 UTC) #3
Mike Belshe
http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.cc File net/base/address_list.cc (right): http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.cc#newcode262 net/base/address_list.cc:262: return NULL; On 2011/03/01 02:52:33, eroman wrote: > under ...
9 years, 9 months ago (2011-03-01 19:01:33 UTC) #4
eroman
LGTM (did you upload the latest patchset, I don't see the changes you described?) http://codereview.chromium.org/6598040/diff/4005/net/base/address_list.cc ...
9 years, 9 months ago (2011-03-01 22:11:53 UTC) #5
Mike Belshe
On 2011/03/01 22:11:53, eroman wrote: > LGTM (did you upload the latest patchset, I don't ...
9 years, 9 months ago (2011-03-01 22:25:54 UTC) #6
eroman
At the risk of beating this thread to death... > 2 heap allocates vs 1 ...
9 years, 9 months ago (2011-03-01 22:29:53 UTC) #7
Mike Belshe
On 2011/03/01 22:29:53, eroman wrote: > At the risk of beating this thread to death... ...
9 years, 9 months ago (2011-03-01 23:16:43 UTC) #8
eroman
9 years, 9 months ago (2011-03-04 01:16:40 UTC) #9
Ah, I missed that in my review (I didn't realize you were returning an
AddressList*) from that function.

Why not just return an |AddressList| ?

If you did that, you wouldn't have the extra heap allocation, and the comments I
said earlier will actually make sense.

Powered by Google App Engine
This is Rietveld 408576698