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

Unified Diff: runtime/bin/file.cc

Issue 2698813002: [dart:io][windows] Make unicode characters display correctly. (Closed)
Patch Set: Address comments Created 3 years, 10 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.h ('k') | runtime/bin/file_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.cc
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index feeb130fec57106d5851ef6b3fde0b32920e0b55..55ed95260d7936bb7a577c700df043824ae6f398 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -76,6 +76,22 @@ void FUNCTION_NAME(File_SetPointer)(Dart_NativeArguments args) {
}
+void FUNCTION_NAME(File_SetTranslation)(Dart_NativeArguments args) {
+ File* file = GetFile(args);
+ ASSERT(file != NULL);
+ int64_t translation;
+ Dart_Handle status = Dart_GetNativeIntegerArgument(args, 1, &translation);
+ if (Dart_IsError(status)) {
+ Dart_PropagateError(status);
+ }
+ if ((translation != File::kText) && (translation != File::kBinary)) {
+ Dart_ThrowException(DartUtils::NewDartArgumentError(
+ "The argument must be a FileTranslation mode"));
+ }
+ file->SetTranslation(static_cast<File::DartFileTranslation>(translation));
+}
+
+
void FUNCTION_NAME(File_Open)(Dart_NativeArguments args) {
const char* filename =
DartUtils::GetStringValue(Dart_GetNativeArgument(args, 0));
« no previous file with comments | « runtime/bin/file.h ('k') | runtime/bin/file_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698