Index: sdk/lib/io/file_impl.dart |
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart |
index 5a7977569adde579fc3057e0c0b030f4c217346a..89af6c3ea7da1cd052212c449df25301df71607a 100644 |
--- a/sdk/lib/io/file_impl.dart |
+++ b/sdk/lib/io/file_impl.dart |
@@ -198,29 +198,8 @@ const int _WRITE_LIST_REQUEST = 18; |
const int _CREATE_LINK_REQUEST = 19; |
const int _DELETE_LINK_REQUEST = 20; |
const int _LINK_TARGET_REQUEST = 21; |
- |
-// Base class for _File and _RandomAccessFile with shared functions. |
-class _FileBase { |
- bool _isErrorResponse(response) { |
- return response is List && response[0] != _SUCCESS_RESPONSE; |
- } |
- |
- _exceptionFromResponse(response, String message) { |
- assert(_isErrorResponse(response)); |
- switch (response[_ERROR_RESPONSE_ERROR_TYPE]) { |
- case _ILLEGAL_ARGUMENT_RESPONSE: |
- return new ArgumentError(); |
- case _OSERROR_RESPONSE: |
- var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE], |
- response[_OSERROR_RESPONSE_ERROR_CODE]); |
- return new FileIOException(message, err); |
- case _FILE_CLOSED_RESPONSE: |
- return new FileIOException("File closed"); |
- default: |
- return new Exception("Unknown error"); |
- } |
- } |
-} |
+const int _TYPE_REQUEST = 22; |
+const int _IDENTICAL_REQUEST = 23; |
// TODO(ager): The only reason for this class is that the patching |
// mechanism doesn't seem to like patching a private top level |
@@ -230,7 +209,7 @@ class _FileUtils { |
} |
// Class for encapsulating the native implementation of files. |
-class _File extends _FileBase implements File { |
+class _File implements File { |
// Constructor for file. |
_File(String this._path) { |
if (_path is! String) { |
@@ -587,7 +566,7 @@ class _File extends _FileBase implements File { |
} |
-class _RandomAccessFile extends _FileBase implements RandomAccessFile { |
+class _RandomAccessFile implements RandomAccessFile { |
_RandomAccessFile(int this._id, String this._path); |
Future<RandomAccessFile> close() { |