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

Issue 655063002: Use uint16 for port numbers more pervasively. (Closed)

Created:
6 years, 2 months ago by Peter Kasting
Modified:
6 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke, Paweł Hajdan Jr.
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use uint16 for port numbers more pervasively. We currently use a mixture of ints and uint16s for port numbers. This triggers a variety of "value possibly truncated" warnings on MSVC (currently disabled) wherever we implicitly truncate. Fix this by using uint16 consistently through more functions. (Using int consistently would be more problematic as the majority of third-party/system APIs that use port numbers use 16-bit types for them.) By far the majority of these changes are fallout from changing IPEndPoint, which is widely used; it'd be difficult to split this CL up into smaller pieces :( Note that I didn't use uint16_t to avoid introducing inconsistencies between existing uint16 usage and new uint16_t usage. Conversion of everything to uint16_t can happen later. This CL was reviewed and approved in pieces in the following CLs: https://codereview.chromium.org/716223002/ https://codereview.chromium.org/717263003/ https://codereview.chromium.org/717373002/ https://codereview.chromium.org/718273002/ https://codereview.chromium.org/722503002/ Committing as TBR to the original reviewers. BUG=81439 TEST=none TBR=gunsch,cpu,jhawkins,davidben,jyasskin,mmenke Committed: https://crrev.com/cba132919fff063c1cfbe88e9a6f1bf4583729cb Cr-Commit-Position: refs/heads/master@{#304961}

Patch Set 1 #

Patch Set 2 : Checkpoint #

Patch Set 3 : #

Patch Set 4 : Resync #

Patch Set 5 : Resync #

Patch Set 6 : Resync #

Patch Set 7 : Self-reviews #

Patch Set 8 : Reviews #

Patch Set 9 : Final review comment #

Patch Set 10 : Resync #

Patch Set 11 : Revert bad change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -404 lines) Patch
M chrome/browser/browser_process.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/browser_list_tabcontents_provider.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/browser_list_tabcontents_provider.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/devtools/device/adb/mock_adb_server.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/remote_debugging_server.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/devtools/remote_debugging_server.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_browsertest.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/dial/dial_service.cc View 1 2 3 4 5 5 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/socket/udp_socket_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/app_background_page_apitest.cc View 1 2 3 10 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/net/dns_probe_service.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/net/dns_probe_test_util.cc View 1 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/net/sdch_browsertest.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/host_zoom_map_browsertest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/permissions/permissions_data_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/testing_browser_process.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/base/testing_browser_process.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/chromedriver/chrome_launcher.cc View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/test/chromedriver/net/port_server.h View 1 2 chunks +16 lines, -16 lines 0 comments Download
M chrome/test/chromedriver/net/port_server.cc View 1 2 3 4 5 6 6 chunks +24 lines, -20 lines 0 comments Download
M chrome/test/chromedriver/net/port_server_unittest.cc View 1 4 chunks +10 lines, -10 lines 0 comments Download
M chrome/test/chromedriver/net/websocket.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/test/chromedriver/server/chromedriver_server.cc View 1 2 3 6 chunks +10 lines, -6 lines 0 comments Download
M chromecast/browser/devtools/remote_debugging_server.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/devtools/remote_debugging_server.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -7 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/devtools/devtools_http_handler_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/devtools/devtools_http_handler_unittest.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/devtools/protocol/tethering_handler.h View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/devtools/protocol/tethering_handler.cc View 1 2 3 4 5 11 chunks +13 lines, -13 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/p2p/socket_host_test_utils.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_test_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_socket_utils.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_tcp_socket.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/devtools_http_handler.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/common/common_param_traits.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/public/common/socket_permission_request.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M content/shell/browser/shell_devtools_manager_delegate.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M extensions/browser/api/cast_channel/cast_channel_api.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M extensions/browser/api/socket/socket.h View 1 2 3 4 chunks +11 lines, -10 lines 0 comments Download
M extensions/browser/api/socket/socket.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/api/socket/socket_api.h View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/api/socket/socket_api.cc View 1 5 chunks +14 lines, -5 lines 0 comments Download
M extensions/browser/api/socket/tcp_socket.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M extensions/browser/api/socket/tcp_socket.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/api/socket/tls_socket.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M extensions/browser/api/socket/tls_socket.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M extensions/browser/api/socket/udp_socket.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M extensions/browser/api/socket/udp_socket.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/permissions/socket_permission.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M extensions/common/permissions/socket_permission_entry.cc View 1 2 chunks +5 lines, -4 lines 0 comments Download
M media/cast/test/receiver.cc View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M media/cast/test/sender.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M media/cast/test/utility/udp_proxy_main.cc View 1 2 3 4 5 6 7 1 chunk +9 lines, -2 lines 0 comments Download
M net/base/host_mapping_rules.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/base/host_port_pair.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M net/base/ip_endpoint.h View 1 9 10 2 chunks +3 lines, -3 lines 0 comments Download
M net/base/ip_endpoint.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/base/ip_endpoint_unittest.cc View 1 2 3 8 chunks +9 lines, -9 lines 0 comments Download
M net/base/net_util.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M net/dns/dns_config_service_win_unittest.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M net/dns/host_resolver.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/dns/host_resolver_impl_unittest.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M net/dns/mock_host_resolver.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/ftp/ftp_network_transaction.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/ftp/ftp_network_transaction.cc View 1 2 chunks +12 lines, -8 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -5 lines 0 comments Download
M net/http/http_server_properties_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_server_properties_manager.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -3 lines 0 comments Download
M net/http/http_stream_factory.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M net/http/http_stream_factory_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_stream_factory_impl_job.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -10 lines 0 comments Download
M net/proxy/proxy_server.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/quic/quic_connection.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/quic/test_tools/quic_test_utils.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/socket/client_socket_pool_manager.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M net/socket/server_socket.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M net/socket/server_socket.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/socket/socket_test_util.h View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/socket/tcp_listen_socket.h View 1 2 3 2 chunks +5 lines, -20 lines 0 comments Download
M net/socket/tcp_listen_socket.cc View 1 2 3 4 chunks +5 lines, -15 lines 0 comments Download
M net/socket/tcp_server_socket_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/socket/tcp_socket_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download
M net/socket/transport_client_socket_unittest.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M net/socket/unix_domain_server_socket_posix.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/socket/unix_domain_server_socket_posix.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/spdy/hpack_huffman_aggregator.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -9 lines 0 comments Download
M net/test/embedded_test_server/embedded_test_server.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/test/embedded_test_server/embedded_test_server.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/test/embedded_test_server/embedded_test_server_unittest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M net/tools/gdig/gdig.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -2 lines 0 comments Download
M net/udp/udp_socket_unittest.cc View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download
M net/udp/udp_socket_win.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M ppapi/shared_impl/private/net_address_private_impl.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/shared_impl/private/net_address_private_impl.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/chromoting_messages.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/win/rdp_client.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M remoting/protocol/chromium_socket_factory.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/protocol/network_settings.h View 1 2 chunks +6 lines, -6 lines 0 comments Download
M remoting/protocol/network_settings.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/protocol/network_settings_unittest.cc View 1 1 chunk +7 lines, -7 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (7 generated)
Tom Sepez
Rubberstamp LGTM on changing int types.
6 years, 1 month ago (2014-11-19 22:47:19 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/655063002/160001
6 years, 1 month ago (2014-11-19 22:49:00 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/93937) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/83756) win_gpu ...
6 years, 1 month ago (2014-11-19 22:56:24 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/655063002/180001
6 years, 1 month ago (2014-11-19 23:05:17 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/18899) linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/35650)
6 years, 1 month ago (2014-11-19 23:13:52 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/655063002/200001
6 years, 1 month ago (2014-11-20 00:42:59 UTC) #13
commit-bot: I haz the power
Committed patchset #11 (id:200001)
6 years, 1 month ago (2014-11-20 03:35:40 UTC) #14
commit-bot: I haz the power
6 years, 1 month ago (2014-11-20 03:36:16 UTC) #15
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/cba132919fff063c1cfbe88e9a6f1bf4583729cb
Cr-Commit-Position: refs/heads/master@{#304961}

Powered by Google App Engine
This is Rietveld 408576698