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

Unified Diff: runtime/bin/socket_impl.dart

Issue 10443008: Implement File.lastModified. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Return ms from C Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_win.cc ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index 139344e7b35a5747edc5e6388a2b9ffd4c7d4d56..419db47acd15fbd9280f9499b1f5e4426d3a2e86 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -207,10 +207,10 @@ class _SocketBase {
} else if (error is List) {
assert(_isErrorResponse(error));
switch (error[0]) {
- case _FileUtils.kIllegalArgumentResponse:
+ case _FileUtils.ILLEGAL_ARGUMENT_RESPONSE:
doReportError(new IllegalArgumentException());
break;
- case _FileUtils.kOSErrorResponse:
+ case _FileUtils.OSERROR_RESPONSE:
doReportError(new SocketIOException(
message, new OSError(error[2], error[1])));
break;
@@ -313,11 +313,7 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
class _Socket extends _SocketBase implements Socket {
- static final kSuccessResponse = 0;
- static final kIllegalArgumentResponse = 1;
- static final kOSErrorResponse = 2;
-
- static final kHostNameLookup = 0;
+ static final HOST_NAME_LOOKUP = 0;
// Constructs a new socket. During the construction an asynchronous
// host name lookup is initiated. The returned socket is not yet
@@ -326,7 +322,7 @@ class _Socket extends _SocketBase implements Socket {
Socket socket = new _Socket._internal();
_ensureSocketService();
List request = new List(2);
- request[0] = kHostNameLookup;
+ request[0] = HOST_NAME_LOOKUP;
request[1] = host;
_socketService.call(request).then((response) {
if (socket._isErrorResponse(response)) {
@@ -443,7 +439,7 @@ class _Socket extends _SocketBase implements Socket {
native "Socket_WriteList";
bool _isErrorResponse(response) {
- return response is List && response[0] != _FileUtils.kSuccessResponse;
+ return response is List && response[0] != _FileUtils.SUCCESS_RESPONSE;
}
bool _createConnect(String host, int port) native "Socket_CreateConnect";
« no previous file with comments | « runtime/bin/file_win.cc ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698