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

Unified Diff: runtime/bin/process_win.cc

Issue 1194883002: Improve the encoding/decoding to/from system encoding on Windows (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments from lrn@ Created 5 years, 6 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/process.cc ('k') | runtime/bin/socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process_win.cc
diff --git a/runtime/bin/process_win.cc b/runtime/bin/process_win.cc
index d57cde0afc98b77f9a4156156c3ebbc8ee71a7b1..ebf4ce3982c118d5403ffa8598c7fe2a4afcd7c8 100644
--- a/runtime/bin/process_win.cc
+++ b/runtime/bin/process_win.cc
@@ -309,7 +309,7 @@ static int SetOsErrorMessage(char** os_error_message) {
const int kMaxMessageLength = 256;
wchar_t message[kMaxMessageLength];
FormatMessageIntoBuffer(error_code, message, kMaxMessageLength);
- *os_error_message = StringUtils::WideToUtf8(message);
+ *os_error_message = StringUtilsWin::WideToUtf8(message);
return error_code;
}
@@ -433,10 +433,10 @@ class ProcessStarter {
exit_handles_[kWriteHandle] = INVALID_HANDLE_VALUE;
// Transform input strings to system format.
- const wchar_t* system_path = StringUtils::Utf8ToWide(path_);
+ const wchar_t* system_path = StringUtilsWin::Utf8ToWide(path_);
wchar_t** system_arguments = new wchar_t*[arguments_length];
for (int i = 0; i < arguments_length; i++) {
- system_arguments[i] = StringUtils::Utf8ToWide(arguments[i]);
+ system_arguments[i] = StringUtilsWin::Utf8ToWide(arguments[i]);
}
// Compute command-line length.
@@ -474,7 +474,7 @@ class ProcessStarter {
wchar_t** system_environment = new wchar_t*[environment_length];
// Convert environment strings to system strings.
for (intptr_t i = 0; i < environment_length; i++) {
- system_environment[i] = StringUtils::Utf8ToWide(environment[i]);
+ system_environment[i] = StringUtilsWin::Utf8ToWide(environment[i]);
}
// An environment block is a sequence of zero-terminated strings
@@ -506,7 +506,8 @@ class ProcessStarter {
system_working_directory_ = NULL;
if (working_directory_ != NULL) {
- system_working_directory_ = StringUtils::Utf8ToWide(working_directory_);
+ system_working_directory_ =
+ StringUtilsWin::Utf8ToWide(working_directory_);
}
attribute_list_ = NULL;
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698