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

Issue 10050011: Add member localHostname() to the Dart IO Platform class. (Closed)

Created:
8 years, 8 months ago by Anders Johnsen
Modified:
8 years, 8 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add member localHostname() to the Dart IO Platform class. BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=6409

Patch Set 1 #

Total comments: 3

Patch Set 2 : Using static bool to control initialization. #

Patch Set 3 : Using static bool to control initialization. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -0 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/platform.h View 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/bin/platform.cc View 1 chunk +13 lines, -0 lines 0 comments Download
runtime/bin/platform.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/platform_impl.dart View 2 chunks +10 lines, -0 lines 0 comments Download
M runtime/bin/platform_linux.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/platform_macos.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/bin/platform_win.cc View 1 2 chunks +12 lines, -0 lines 0 comments Download
M tests/standalone/src/io/PlatformTest.dart View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Anders Johnsen
https://chromiumcodereview.appspot.com/10050011/diff/1/runtime/bin/platform_win.cc File runtime/bin/platform_win.cc (right): https://chromiumcodereview.appspot.com/10050011/diff/1/runtime/bin/platform_win.cc#newcode11 runtime/bin/platform_win.cc:11: return Socket::Initialize(); I would like to move the Socket::Initialize ...
8 years, 8 months ago (2012-04-11 10:12:12 UTC) #1
Søren Gjesse
8 years, 8 months ago (2012-04-11 11:00:54 UTC) #2
lgtm

https://chromiumcodereview.appspot.com/10050011/diff/1/runtime/bin/platform_w...
File runtime/bin/platform_win.cc (right):

https://chromiumcodereview.appspot.com/10050011/diff/1/runtime/bin/platform_w...
runtime/bin/platform_win.cc:10: // Load Socket for LocalHostname.
I think we should consider moving this to LocalHostname as otherwise otherwise
WSAStartup will always be called even if no wininet2 operations (including
gethostname) are used.

You coukd have a static bool in either Platform::LocalHostname or
Socket::Initialize to check for multiple initiaizations.

Load -> Initialize

Powered by Google App Engine
This is Rietveld 408576698