Chromium Code Reviews| Index: remoting/host/win/launch_process_with_token.cc |
| diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc |
| index 0dfbb4d2dd63006d9ad1efe9eb7f4f2c17d4dce8..e1440604e4af30052501d2ca7d21f2433cb6d25a 100644 |
| --- a/remoting/host/win/launch_process_with_token.cc |
| +++ b/remoting/host/win/launch_process_with_token.cc |
| @@ -20,8 +20,8 @@ using base::win::ScopedHandle; |
| namespace { |
| -const wchar_t kCreateProcessDefaultPipeNameFormat[] = |
| - L"\\\\.\\Pipe\\TerminalServer\\SystemExecSrvr\\%d"; |
| +const char kCreateProcessDefaultPipeNameFormat[] = |
| + "\\\\.\\Pipe\\TerminalServer\\SystemExecSrvr\\%d"; |
| // Undocumented WINSTATIONINFOCLASS value causing |
| // winsta!WinStationQueryInformationW() to return the name of the pipe for |
| @@ -45,13 +45,13 @@ wchar_t kDefaultDesktopName[] = L"winsta0\\default"; |
| // OS functionality and will likely not work on anything but XP or W2K3. |
| bool CreateRemoteSessionProcess( |
| uint32 session_id, |
| - const std::wstring& application_name, |
| - const std::wstring& command_line, |
| + const FilePath::StringType& application_name, |
| + const CommandLine::StringType& command_line, |
| PROCESS_INFORMATION* process_information_out) |
| { |
| DCHECK(base::win::GetVersion() == base::win::VERSION_XP); |
| - std::wstring pipe_name; |
| + string16 pipe_name; |
| // Use winsta!WinStationQueryInformationW() to determine the process creation |
| // pipe name for the session. |
| @@ -77,7 +77,8 @@ bool CreateRemoteSessionProcess( |
| // Use the default pipe name if we couldn't query its name. |
| if (pipe_name.empty()) { |
| - pipe_name = StringPrintf(kCreateProcessDefaultPipeNameFormat, session_id); |
| + pipe_name = UTF8ToUTF16( |
|
Wez
2012/08/03 21:26:15
nit: Why not have pipe_name be std::string and UTF
alexeypa (please no reviews)
2012/08/03 22:00:18
To avoid UTF8 <-> UTF16 conversion in three places
Wez
2012/08/06 17:29:38
Makes sense; I'd recommend working with std::strin
alexeypa (please no reviews)
2012/08/06 17:56:18
This will reduce number of conversions to two, not
Wez
2012/08/06 18:41:21
Of course; good point.
|
| + StringPrintf(kCreateProcessDefaultPipeNameFormat, session_id)); |
| } |
| // Try to connect to the named pipe. |
| @@ -111,7 +112,7 @@ bool CreateRemoteSessionProcess( |
| return false; |
| } |
| - std::wstring desktop_name(kDefaultDesktopName); |
| + string16 desktop_name(WideToUTF16(kDefaultDesktopName)); |
|
Wez
2012/08/03 21:26:15
nit: Why does kDefaultDesktopName need to be wide?
alexeypa (please no reviews)
2012/08/03 22:00:18
Done.
|
| // |CreateProcessRequest| structure passes the same parameters to |
| // the execution server as CreateProcessAsUser() function does. Strings are |
| @@ -244,10 +245,10 @@ bool CreateRemoteSessionProcess( |
| namespace remoting { |
| bool LaunchProcessWithToken(const FilePath& binary, |
| - const std::wstring& command_line, |
| + const CommandLine::StringType& command_line, |
| HANDLE user_token, |
| base::Process* process_out) { |
| - std::wstring application_name = binary.value(); |
| + FilePath::StringType application_name = binary.value(); |
| base::win::ScopedProcessInformation process_info; |
| STARTUPINFOW startup_info; |