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

Issue 10537017: Allow hostnames in socket.connect(). (Closed)

Created:
8 years, 6 months ago by miket_OOO
Modified:
8 years, 6 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Do hostname resolution. Interesting questions to ponder: - Do we still need the DNS API? Originally this was broken out separately to make it match the low-level network APIs. But (a) it felt like needless busywork for the developer who just wanted to connect to a host, and (b) it's necessary to pass a hostname to connect() to provide a match with host permissions in the manifest. - We do NOT do the same work for socket.bind(). It doesn't quite make sense to bind to a hostname (unless the hostname is "localhost"). Using a hostname is certainly possible, but requiring an IP address for now is probably reasonable. BUG=110520 TEST=They still work when enhanced to use "localhost" appropriately. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141101

Patch Set 1 : Patch Set 1 #

Total comments: 5

Patch Set 2 : Fixed DNS browser test. #

Patch Set 3 : mihaip's comments + clang fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+375 lines, -134 lines) Patch
M chrome/browser/extensions/api/dns/dns_api.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/dns/dns_api.cc View 4 chunks +4 lines, -17 lines 0 comments Download
M chrome/browser/extensions/api/dns/dns_apitest.cc View 5 chunks +14 lines, -65 lines 0 comments Download
A chrome/browser/extensions/api/dns/host_resolver_wrapper.h View 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/dns/host_resolver_wrapper.cc View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/dns/mock_host_resolver_creator.h View 1 2 1 chunk +52 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/dns/mock_host_resolver_creator.cc View 1 1 chunk +70 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.h View 3 chunks +22 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.cc View 1 2 14 chunks +77 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_apitest.cc View 4 chunks +30 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/experimental_socket.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/dns/api/background.js View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/socket/api/background.js View 1 chunk +24 lines, -23 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
miket_OOO
8 years, 6 months ago (2012-06-06 21:10:14 UTC) #1
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10537017/diff/1015/chrome/browser/extensions/api/socket/socket_api.cc File chrome/browser/extensions/api/socket/socket_api.cc (right): http://codereview.chromium.org/10537017/diff/1015/chrome/browser/extensions/api/socket/socket_api.cc#newcode147 chrome/browser/extensions/api/socket/socket_api.cc:147: Release(); // Added in StartDnsLookup(). Do you need to ...
8 years, 6 months ago (2012-06-07 00:29:44 UTC) #2
Mihai Parparita -not on Chrome
On Wed, Jun 6, 2012 at 2:10 PM, <miket@chromium.org> wrote: > - Do we still ...
8 years, 6 months ago (2012-06-07 00:32:47 UTC) #3
miket_OOO
http://codereview.chromium.org/10537017/diff/1015/chrome/common/extensions/api/experimental_socket.idl#newcode92 > chrome/common/extensions/api/experimental_socket.idl:92: // |address| : The > address of the remote machine. > I ...
8 years, 6 months ago (2012-06-07 15:48:11 UTC) #4
miket_OOO
> We should remove the DNS API for now. OK (see announcement I just sent ...
8 years, 6 months ago (2012-06-07 16:02:29 UTC) #5
Mihai Parparita -not on Chrome
On Thu, Jun 7, 2012 at 9:02 AM, <miket@chromium.org> wrote: > OK (see announcement I ...
8 years, 6 months ago (2012-06-07 17:30:17 UTC) #6
miket_OOO
Changes uploaded. Peng's right about sendTo(), so I'll have to add support for that before ...
8 years, 6 months ago (2012-06-07 17:36:12 UTC) #7
Mihai Parparita -not on Chrome
LGTM
8 years, 6 months ago (2012-06-07 17:38:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/10537017/9018
8 years, 6 months ago (2012-06-07 21:24:11 UTC) #9
commit-bot: I haz the power
8 years, 6 months ago (2012-06-07 22:38:32 UTC) #10
Change committed as 141101

Powered by Google App Engine
This is Rietveld 408576698