| 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..800d936e8ae6b7db814af61990706cbbad0f1e2c 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
|
| @@ -38,20 +38,20 @@ const int kMaxLaunchDelaySeconds = 60;
|
| const int kMinLaunchDelaySeconds = 1;
|
|
|
| // Name of the default session desktop.
|
| -wchar_t kDefaultDesktopName[] = L"winsta0\\default";
|
| +const char kDefaultDesktopName[] = "winsta0\\default";
|
|
|
| // Requests the execution server to create a process in the specified session
|
| // using the default (i.e. Winlogon) token. This routine relies on undocumented
|
| // 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(
|
| + 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(UTF8ToUTF16(kDefaultDesktopName));
|
|
|
| // |CreateProcessRequest| structure passes the same parameters to
|
| // the execution server as CreateProcessAsUser() function does. Strings are
|
| @@ -244,17 +245,19 @@ 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;
|
|
|
| + string16 desktop_name(UTF8ToUTF16(kDefaultDesktopName));
|
| +
|
| memset(&startup_info, 0, sizeof(startup_info));
|
| startup_info.cb = sizeof(startup_info);
|
| - startup_info.lpDesktop = kDefaultDesktopName;
|
| + startup_info.lpDesktop = const_cast<char16*>(desktop_name.c_str());
|
|
|
| BOOL result = CreateProcessAsUser(user_token,
|
| application_name.c_str(),
|
|
|