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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed)

Created:
8 years, 7 months ago by szym
Modified:
8 years, 7 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, cbentzel+watch_chromium.org, simonmorris+watch_chromium.org, garykac+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, jam, mihaip+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, eroman, darin-cc_chromium.org, Paweł Hajdan Jr., alexeypa+watch_chromium.org, sergeyu+watch_chromium.org, mmenke, lambroslambrou+watch_chromium.org
Visibility:
Public.

Description

Reimplements net::AddressList without struct addrinfo. net::AddressList extends std::vector<std::IPEndPoint> by canonical name. (Canonical name is planned to be removed as well.) Removes dependency on sys_addrinfo.h throughout the codebase. Introduces net::SockaddrStorage for convenience. BUG=125696 TEST=green waterfall Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135731

Patch Set 1 : . #

Patch Set 2 : Delinted. #

Patch Set 3 : Removing GetPort,SetPort,EnsurePort. Changed IPAddressList constructor to static method. #

Patch Set 4 : Cleaned up. #

Patch Set 5 : Added missing NET_EXPORT to *PortOnAddressList. #

Total comments: 76

Patch Set 6 : Responded to review. #

Total comments: 1

Patch Set 7 : Rebased to master (needed). #

Patch Set 8 : Make inheritance private in AddressList. Fix: MockTCPClientSocket, redefined symbols on MSVS2010. #

Total comments: 5

Patch Set 9 : Addressed eroman's 2nd review. #

Patch Set 10 : get_canonical_name -> canonical_name. iterator to indexing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+706 lines, -1551 lines) Patch
M chrome/browser/chromeos/web_socket_proxy.cc View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/dns/dns_api.cc View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket.cc View 1 2 3 4 5 6 1 chunk +4 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_web_socket_proxy_private_api.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/network_stats.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/network_stats.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 4 5 6 2 chunks +3 lines, -6 lines 0 comments Download
M chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp View 1 2 chunks +5 lines, -20 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_dispatcher_host.cc View 1 2 3 4 5 1 chunk +3 lines, -10 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_server.cc View 1 2 3 3 chunks +5 lines, -8 lines 0 comments Download
M content/browser/renderer_host/pepper_message_filter.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -3 lines 0 comments Download
M jingle/notifier/base/chrome_async_socket.cc View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M jingle/notifier/communicator/xmpp_connection_generator.cc View 1 2 3 4 5 2 chunks +7 lines, -8 lines 0 comments Download
M net/base/address_list.h View 1 2 3 4 5 6 7 8 9 2 chunks +47 lines, -89 lines 0 comments Download
M net/base/address_list.cc View 1 2 3 4 5 6 7 1 chunk +34 lines, -251 lines 0 comments Download
M net/base/address_list_net_log_param.cc View 1 2 3 4 5 3 chunks +3 lines, -5 lines 0 comments Download
M net/base/address_list_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +48 lines, -253 lines 0 comments Download
M net/base/host_port_pair.h View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M net/base/host_port_pair.cc View 1 2 3 4 5 3 chunks +4 lines, -6 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 3 4 5 7 chunks +20 lines, -23 lines 0 comments Download
M net/base/host_resolver_impl_unittest.cc View 1 2 3 4 5 5 chunks +9 lines, -23 lines 0 comments Download
M net/base/host_resolver_proc.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/base/host_resolver_proc.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/base/ip_endpoint.h View 1 2 3 3 chunks +11 lines, -3 lines 0 comments Download
M net/base/ip_endpoint.cc View 1 2 3 4 5 6 chunks +35 lines, -28 lines 0 comments Download
M net/base/ip_endpoint_unittest.cc View 1 2 3 3 chunks +11 lines, -13 lines 0 comments Download
M net/base/mapped_host_resolver_unittest.cc View 1 2 3 9 chunks +14 lines, -15 lines 0 comments Download
M net/base/mock_host_resolver.cc View 1 2 3 4 5 5 chunks +13 lines, -16 lines 0 comments Download
M net/base/net_util.h View 1 2 3 chunks +11 lines, -27 lines 0 comments Download
M net/base/net_util.cc View 2 chunks +0 lines, -77 lines 0 comments Download
M net/base/net_util_unittest.cc View 1 2 3 4 5 6 chunks +26 lines, -47 lines 0 comments Download
M net/base/single_request_host_resolver_unittest.cc View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M net/curvecp/client_packetizer.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/curvecp/client_packetizer.cc View 1 2 3 4 5 3 chunks +5 lines, -14 lines 0 comments Download
M net/curvecp/curvecp_client_socket.cc View 1 2 chunks +1 line, -12 lines 0 comments Download
M net/curvecp/curvecp_server_socket.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M net/dns/dns_config_service.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M net/dns/dns_config_service_win_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M net/dns/dns_response_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -18 lines 0 comments Download
M net/dns/dns_transaction_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/ftp/ftp_network_transaction.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M net/ftp/ftp_network_transaction_unittest.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M net/http/http_auth_handler_negotiate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M net/http/http_network_transaction_spdy2_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_network_transaction_spdy3_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_stream_parser.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_resolver_js_bindings.cc View 3 chunks +4 lines, -6 lines 0 comments Download
M net/proxy/proxy_resolver_js_bindings_unittest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M net/socket/socket_test_util.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/socket/socks5_client_socket.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/socket/socks_client_socket.cc View 1 2 3 4 5 2 chunks +6 lines, -8 lines 0 comments Download
M net/socket/ssl_client_socket_mac.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 5 6 2 chunks +7 lines, -6 lines 0 comments Download
M net/socket/ssl_client_socket_pool_unittest.cc View 1 2 3 4 5 3 chunks +2 lines, -5 lines 0 comments Download
M net/socket/tcp_client_socket_libevent.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M net/socket/tcp_client_socket_libevent.cc View 1 2 3 4 5 6 7 8 16 chunks +41 lines, -39 lines 0 comments Download
M net/socket/tcp_client_socket_unittest.cc View 1 2 3 4 5 4 chunks +3 lines, -10 lines 0 comments Download
M net/socket/tcp_client_socket_win.h View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M net/socket/tcp_client_socket_win.cc View 1 2 3 4 5 6 7 8 11 chunks +25 lines, -25 lines 0 comments Download
M net/socket/tcp_server_socket_libevent.cc View 1 2 3 6 chunks +13 lines, -18 lines 0 comments Download
M net/socket/tcp_server_socket_unittest.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M net/socket/tcp_server_socket_win.cc View 1 2 3 6 chunks +11 lines, -18 lines 0 comments Download
M net/socket/transport_client_socket_pool.h View 1 chunk +3 lines, -6 lines 0 comments Download
M net/socket/transport_client_socket_pool.cc View 1 2 3 8 chunks +17 lines, -51 lines 0 comments Download
M net/socket/transport_client_socket_pool_unittest.cc View 4 chunks +53 lines, -66 lines 0 comments Download
M net/socket_stream/socket_stream.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M net/spdy/spdy_http_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_session_pool.h View 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/spdy_session_pool.cc View 4 chunks +8 lines, -15 lines 0 comments Download
M net/spdy/spdy_session_spdy2_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/spdy/spdy_session_spdy3_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M net/spdy/spdy_test_util_spdy2.h View 2 chunks +1 line, -2 lines 0 comments Download
M net/spdy/spdy_test_util_spdy3.h View 2 chunks +1 line, -2 lines 0 comments Download
M net/udp/udp_socket_libevent.cc View 1 2 3 7 chunks +23 lines, -35 lines 0 comments Download
M net/udp/udp_socket_unittest.cc View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M net/udp/udp_socket_win.cc View 1 2 3 4 5 7 chunks +20 lines, -28 lines 0 comments Download
M net/websockets/websocket_job_spdy2_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -11 lines 0 comments Download
M net/websockets/websocket_job_spdy3_unittest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -11 lines 0 comments Download
M net/websockets/websocket_throttle.cc View 1 2 3 5 chunks +18 lines, -38 lines 0 comments Download
M net/websockets/websocket_throttle_unittest.cc View 1 2 3 4 5 10 chunks +28 lines, -50 lines 0 comments Download
M ppapi/shared_impl/private/net_address_private_impl.cc View 3 chunks +6 lines, -11 lines 0 comments Download
M ppapi/shared_impl/private/ppb_host_resolver_shared.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M ppapi/shared_impl/private/ppb_host_resolver_shared.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -7 lines 0 comments Download
M remoting/jingle_glue/ssl_socket_adapter.cc View 1 2 3 2 chunks +7 lines, -16 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
szym
AddressList is used everywhere! PTAL before I seek reviews from OWNERS. There's a few TODO(szym-addr) ...
8 years, 7 months ago (2012-05-02 06:26:01 UTC) #1
Do not use (sergeyu)
Can we encapsulate std::vector<> instead of inheriting from it? Inheriting from STL classes always looks ...
8 years, 7 months ago (2012-05-02 17:54:45 UTC) #2
szym
On 2012/05/02 17:54:45, sergeyu1 wrote: > Can we encapsulate std::vector<> instead of inheriting from it? ...
8 years, 7 months ago (2012-05-02 18:04:57 UTC) #3
Do not use (sergeyu)
On Wed, May 2, 2012 at 11:04 AM, <szym@chromium.org> wrote: > On 2012/05/02 17:54:45, sergeyu1 ...
8 years, 7 months ago (2012-05-02 18:56:51 UTC) #4
szym
> iterators - yes, but only const version, operator[] - probably no. > > I ...
8 years, 7 months ago (2012-05-02 19:12:00 UTC) #5
szym
On 2012/05/02 19:12:00, szym wrote: > I plan to remove AddressList::StartsWithIPv6, > ::EnsurePort and ::GetPort ...
8 years, 7 months ago (2012-05-02 19:21:34 UTC) #6
eroman
Before reviewing any of the other files I'd like to hammer out the API in ...
8 years, 7 months ago (2012-05-02 19:57:45 UTC) #7
szym
On 2012/05/02 19:57:45, eroman wrote: > BTW, I strongly discourage trying to hide the std::vector ...
8 years, 7 months ago (2012-05-02 20:21:25 UTC) #8
eroman
Alright I'm sold -- extending std::vector seems like a good strategy. I won't worry about ...
8 years, 7 months ago (2012-05-02 20:29:48 UTC) #9
szym
On 2012/05/02 20:21:25, szym wrote: > if AddressList is a typedef, then > there's no ...
8 years, 7 months ago (2012-05-02 20:32:58 UTC) #10
szym
Ready for review. PTAL.
8 years, 7 months ago (2012-05-03 19:45:18 UTC) #11
eroman
Generally looks good, nice simplifications. I want to see responses to my comments marked by ...
8 years, 7 months ago (2012-05-04 01:08:41 UTC) #12
szym
Thanks a lot for the quick review. A few concerns: 1) I think we should ...
8 years, 7 months ago (2012-05-04 02:38:29 UTC) #13
eroman
http://codereview.chromium.org/10309002/diff/5163/net/base/host_resolver_proc.h File net/base/host_resolver_proc.h (right): http://codereview.chromium.org/10309002/diff/5163/net/base/host_resolver_proc.h#newcode20 net/base/host_resolver_proc.h:20: void NET_EXPORT SetPortOnAddressList(uint16 port, AddressList* list); On 2012/05/04 02:38:29, ...
8 years, 7 months ago (2012-05-04 04:20:21 UTC) #14
szym
Fixed all but the TCP connect address duplicate. Filed bugs for future CLs. Ready for ...
8 years, 7 months ago (2012-05-04 05:27:55 UTC) #15
szym
Reasons for changes in PatchSet 8: 1) address_list.h: changed to AddressList : _private_ std::vector... This ...
8 years, 7 months ago (2012-05-04 18:18:28 UTC) #16
eroman
lgtm http://codereview.chromium.org/10309002/diff/5163/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): http://codereview.chromium.org/10309002/diff/5163/net/socket/tcp_client_socket_libevent.cc#newcode366 net/socket/tcp_client_socket_libevent.cc:366: current_address_index_ = addresses_.size(); On 2012/05/04 02:38:29, szym wrote: ...
8 years, 7 months ago (2012-05-04 19:37:35 UTC) #17
szym
Thanks for review. http://codereview.chromium.org/10309002/diff/70008/chrome/browser/net/network_stats.h File chrome/browser/net/network_stats.h (right): http://codereview.chromium.org/10309002/diff/70008/chrome/browser/net/network_stats.h#newcode154 chrome/browser/net/network_stats.h:154: const net::AddressList& get_address_list() const { return ...
8 years, 7 months ago (2012-05-04 20:20:21 UTC) #18
szym
Thanks for review.
8 years, 7 months ago (2012-05-04 20:20:30 UTC) #19
szym
eroman: Thanks a lot for review! sergeyu: PTAL changes in remoting/, content/browser/renderer_host/p2p/, and optionally jingle/. ...
8 years, 7 months ago (2012-05-04 20:25:23 UTC) #20
szym
On 2012/05/04 20:25:23, szym wrote: > sky: PTAL changes in chrome/browser/ but not chrome/browser/net/ sky: ...
8 years, 7 months ago (2012-05-04 20:27:02 UTC) #21
sky
LGTM
8 years, 7 months ago (2012-05-04 20:54:13 UTC) #22
Sergey Ulanov
remoting/ - LGTM
8 years, 7 months ago (2012-05-04 23:47:17 UTC) #23
viettrungluu
ppapi & pepper_message_filter.cc LGTM.
8 years, 7 months ago (2012-05-07 19:48:04 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szym@chromium.org/10309002/18090
8 years, 7 months ago (2012-05-07 19:53:34 UTC) #25
commit-bot: I haz the power
8 years, 7 months ago (2012-05-07 21:45:06 UTC) #26
Change committed as 135731

Powered by Google App Engine
This is Rietveld 408576698