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

Unified Diff: utils/lib/file_system_vm.dart

Issue 22909059: Some more removals of dart:utf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change ArgumentError to FormatException. Created 7 years, 4 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
« tests/corelib/uri_test.dart ('K') | « tools/testing/dart/android.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/lib/file_system_vm.dart
diff --git a/utils/lib/file_system_vm.dart b/utils/lib/file_system_vm.dart
index d84d08148c9bc6332945d278f19215b91a300949..99b936f18afcb1ab500babf3875106501a93a7ea 100644
--- a/utils/lib/file_system_vm.dart
+++ b/utils/lib/file_system_vm.dart
@@ -5,9 +5,9 @@
// TODO(terry): Investigate common library for file I/O shared between frog and tools.
library file_system_vm;
+import 'dart:convert';
import 'dart:io';
import 'file_system.dart';
-import 'dart:utf';
/** File system implementation using the vm api's. */
class VMFileSystem implements FileSystem {
@@ -23,7 +23,7 @@ class VMFileSystem implements FileSystem {
var buffer = new List<int>(length);
var bytes = file.readIntoSync(buffer, 0, length);
file.closeSync();
- return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
+ return UTF8.decode(bytes);
}
bool fileExists(String filename) {
« tests/corelib/uri_test.dart ('K') | « tools/testing/dart/android.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698