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

Issue 722503002: Use uint16 for port numbers, misc edition (Closed)

Created:
6 years, 1 month ago by Peter Kasting
Modified:
6 years, 1 month ago
CC:
chromium-reviews, zea+watch_chromium.org, chromoting-reviews_chromium.org, hguihot+watch_chromium.org, mikhal+watch_chromium.org, aandrey+blink_chromium.org, miu+watch_chromium.org, tim+watch_chromium.org, vsevik, lcwu+watch_chromium.org, pvalenzuela+watch_chromium.org, devtools-reviews_chromium.org, hubbe+watch_chromium.org, imcheng+watch_chromium.org, jasonroberts+watch_google.com, feature-media-reviews_chromium.org, paulirish+reviews_chromium.org, gunsch+watch_chromium.org, maniscalco+watch_chromium.org, hclam+watch_chromium.org, avayvod+watch_chromium.org, yurys, pwestin+watch_google.com, pfeldman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use uint16 for port numbers, misc edition This is a piece of a larger CL, split up to avoid overwhelming reviewers. The entire CL can be viewed at https://codereview.chromium.org/655063002/ . The intent is to get each piece reviewed separately, then finally land the large CL after all parts have been approved. BUG=81439 TEST=none

Patch Set 1 #

Patch Set 2 : Self-review #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -56 lines) Patch
M chromecast/browser/devtools/remote_debugging_server.h View 1 chunk +1 line, -1 line 0 comments Download
M chromecast/browser/devtools/remote_debugging_server.cc View 1 4 chunks +4 lines, -7 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/cast/test/receiver.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M media/cast/test/sender.cc View 3 chunks +4 lines, -4 lines 1 comment Download
M media/cast/test/utility/udp_proxy_main.cc View 1 1 chunk +9 lines, -2 lines 1 comment Download
M ppapi/shared_impl/private/net_address_private_impl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/shared_impl/private/net_address_private_impl.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/chromoting_messages.h View 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/host/win/rdp_client.cc View 1 chunk +4 lines, -2 lines 1 comment Download
M remoting/protocol/chromium_socket_factory.cc View 1 chunk +2 lines, -2 lines 1 comment Download
M remoting/protocol/network_settings.h View 2 chunks +6 lines, -6 lines 0 comments Download
M remoting/protocol/network_settings.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/protocol/network_settings_unittest.cc View 1 chunk +7 lines, -7 lines 0 comments Download
M sync/internal_api/attachments/attachment_uploader_impl_unittest.cc View 1 chunk +1 line, -1 line 3 comments Download

Messages

Total messages: 6 (2 generated)
Peter Kasting
This is not an independent CL; please see the description for a link to the ...
6 years, 1 month ago (2014-11-12 23:53:56 UTC) #2
gunsch
chromecast/ lgtm
6 years, 1 month ago (2014-11-13 01:14:20 UTC) #4
cpu_(ooo_6.6-7.5)
lgtm https://codereview.chromium.org/722503002/diff/20001/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc File sync/internal_api/attachments/attachment_uploader_impl_unittest.cc (right): https://codereview.chromium.org/722503002/diff/20001/sync/internal_api/attachments/attachment_uploader_impl_unittest.cc#newcode278 sync/internal_api/attachments/attachment_uploader_impl_unittest.cc:278: GURL url(base::StringPrintf("http://localhost:%u/", server_.port())); On 2014/11/12 23:53:55, Peter Kasting ...
6 years, 1 month ago (2014-11-14 18:37:06 UTC) #5
Peter Kasting
6 years, 1 month ago (2014-11-14 20:36:45 UTC) #6
https://codereview.chromium.org/722503002/diff/20001/sync/internal_api/attach...
File sync/internal_api/attachments/attachment_uploader_impl_unittest.cc (right):

https://codereview.chromium.org/722503002/diff/20001/sync/internal_api/attach...
sync/internal_api/attachments/attachment_uploader_impl_unittest.cc:278: GURL
url(base::StringPrintf("http://localhost:%u/", server_.port()));
On 2014/11/14 18:37:06, cpu wrote:
> On 2014/11/12 23:53:55, Peter Kasting wrote:
> > I don't think the distinction here actually matters, given that a uint16 is
> > smaller than an int, but this feels more technically correct.
> 
> I imagine printf'ing is not the best practice here. There must be some url
> builder helper somewhere I hope.

I think we could construct "http://localhost/" and then do a replacement to
insert the port, but honestly I'm not bugged by this route -- it's short, clear,
and guaranteed to work correctly.

Powered by Google App Engine
This is Rietveld 408576698