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

Unified Diff: runtime/bin/directory_impl.dart

Issue 11023003: Clean up file implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/bin/directory_impl.dart
diff --git a/runtime/bin/directory_impl.dart b/runtime/bin/directory_impl.dart
index 4df863048f9a5231c9e3187206c7c0511bba2296..23510f9004e02a7337f08f26d26fa1125c129a24 100644
--- a/runtime/bin/directory_impl.dart
+++ b/runtime/bin/directory_impl.dart
@@ -176,17 +176,17 @@ class _Directory implements Directory {
String get path { return _path; }
bool _isErrorResponse(response) {
- return response is List && response[0] != _FileUtils.SUCCESS_RESPONSE;
+ return response is List && response[0] != _SUCCESS_RESPONSE;
}
Exception _exceptionFromResponse(response, String message) {
assert(_isErrorResponse(response));
- switch (response[_FileUtils.ERROR_RESPONSE_ERROR_TYPE]) {
- case _FileUtils.ILLEGAL_ARGUMENT_RESPONSE:
+ switch (response[_ERROR_RESPONSE_ERROR_TYPE]) {
+ case _ILLEGAL_ARGUMENT_RESPONSE:
return new ArgumentError();
- case _FileUtils.OSERROR_RESPONSE:
- var err = new OSError(response[_FileUtils.OSERROR_RESPONSE_MESSAGE],
- response[_FileUtils.OSERROR_RESPONSE_ERROR_CODE]);
+ case _OSERROR_RESPONSE:
+ var err = new OSError(response[_OSERROR_RESPONSE_MESSAGE],
+ response[_OSERROR_RESPONSE_ERROR_CODE]);
return new DirectoryIOException(message, _path, err);
default:
return new Exception("Unknown error");
@@ -238,14 +238,14 @@ class _DirectoryLister implements DirectoryLister {
break;
case LIST_ERROR:
var errorType =
- message[RESPONSE_ERROR][_FileUtils.ERROR_RESPONSE_ERROR_TYPE];
- if (errorType == _FileUtils.ILLEGAL_ARGUMENT_RESPONSE) {
+ message[RESPONSE_ERROR][_ERROR_RESPONSE_ERROR_TYPE];
+ if (errorType == _ILLEGAL_ARGUMENT_RESPONSE) {
_reportError(new ArgumentError());
- } else if (errorType == _FileUtils.OSERROR_RESPONSE) {
+ } else if (errorType == _OSERROR_RESPONSE) {
var responseError = message[RESPONSE_ERROR];
var err = new OSError(
- responseError[_FileUtils.OSERROR_RESPONSE_MESSAGE],
- responseError[_FileUtils.OSERROR_RESPONSE_ERROR_CODE]);
+ responseError[_OSERROR_RESPONSE_MESSAGE],
+ responseError[_OSERROR_RESPONSE_ERROR_CODE]);
var errorPath = message[RESPONSE_PATH];
if (errorPath == null) errorPath = path;
_reportError(new DirectoryIOException("Directory listing failed",
« no previous file with comments | « runtime/bin/common.dart ('k') | runtime/bin/file_impl.dart » ('j') | runtime/bin/file_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698