| Index: remoting/host/win/unprivileged_process_delegate.cc
|
| diff --git a/remoting/host/win/unprivileged_process_delegate.cc b/remoting/host/win/unprivileged_process_delegate.cc
|
| index 1457bd70386bb61860311a3f67db9f1ee23b2d99..b8ae2497d9b073f16a021313d37c68ce07da170e 100644
|
| --- a/remoting/host/win/unprivileged_process_delegate.cc
|
| +++ b/remoting/host/win/unprivileged_process_delegate.cc
|
| @@ -113,7 +113,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid,
|
| // Convert the logon SID into a string.
|
| std::string logon_sid_string = ConvertSidToString(logon_sid.get());
|
| if (logon_sid_string.empty()) {
|
| - LOG_GETLASTERROR(ERROR) << "Failed to convert a SID to string";
|
| + PLOG(ERROR) << "Failed to convert a SID to string";
|
| return false;
|
| }
|
|
|
| @@ -134,7 +134,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid,
|
| ScopedSd desktop_sd = ConvertSddlToSd(desktop_sddl);
|
| ScopedSd window_station_sd = ConvertSddlToSd(window_station_sddl);
|
| if (!desktop_sd || !window_station_sd) {
|
| - LOG_GETLASTERROR(ERROR) << "Failed to create a security descriptor.";
|
| + PLOG(ERROR) << "Failed to create a security descriptor.";
|
| return false;
|
| }
|
|
|
| @@ -169,13 +169,13 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid,
|
| base::UTF8ToUTF16(window_station_name).c_str(), window_station_flags,
|
| desired_access, &security_attributes));
|
| if (!handles.window_station()) {
|
| - LOG_GETLASTERROR(ERROR) << "CreateWindowStation() failed";
|
| + PLOG(ERROR) << "CreateWindowStation() failed";
|
| return false;
|
| }
|
|
|
| // Switch to the new window station and create a desktop on it.
|
| if (!SetProcessWindowStation(handles.window_station())) {
|
| - LOG_GETLASTERROR(ERROR) << "SetProcessWindowStation() failed";
|
| + PLOG(ERROR) << "SetProcessWindowStation() failed";
|
| return false;
|
| }
|
|
|
| @@ -196,12 +196,12 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid,
|
|
|
| // Switch back to the original window station.
|
| if (!SetProcessWindowStation(current_window_station)) {
|
| - LOG_GETLASTERROR(ERROR) << "SetProcessWindowStation() failed";
|
| + PLOG(ERROR) << "SetProcessWindowStation() failed";
|
| return false;
|
| }
|
|
|
| if (!handles.desktop()) {
|
| - LOG_GETLASTERROR(ERROR) << "CreateDesktop() failed";
|
| + PLOG(ERROR) << "CreateDesktop() failed";
|
| return false;
|
| }
|
|
|
| @@ -237,8 +237,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
|
| // Create a restricted token that will be used to run the worker process.
|
| ScopedHandle token;
|
| if (!CreateRestrictedToken(&token)) {
|
| - LOG_GETLASTERROR(ERROR)
|
| - << "Failed to create a restricted LocalService token";
|
| + PLOG(ERROR) << "Failed to create a restricted LocalService token";
|
| ReportFatalError();
|
| return;
|
| }
|
| @@ -247,7 +246,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
|
| // and desktop.
|
| ScopedSid logon_sid = GetLogonSid(token);
|
| if (!logon_sid) {
|
| - LOG_GETLASTERROR(ERROR) << "Failed to retrieve the logon SID";
|
| + PLOG(ERROR) << "Failed to retrieve the logon SID";
|
| ReportFatalError();
|
| return;
|
| }
|
| @@ -256,7 +255,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
|
| ScopedSd process_sd = ConvertSddlToSd(kWorkerProcessSd);
|
| ScopedSd thread_sd = ConvertSddlToSd(kWorkerThreadSd);
|
| if (!process_sd || !thread_sd) {
|
| - LOG_GETLASTERROR(ERROR) << "Failed to create a security descriptor";
|
| + PLOG(ERROR) << "Failed to create a security descriptor";
|
| ReportFatalError();
|
| return;
|
| }
|
| @@ -298,8 +297,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
|
| // Create our own window station and desktop accessible by |logon_sid|.
|
| WindowStationAndDesktop handles;
|
| if (!CreateWindowStationAndDesktop(logon_sid.Pass(), &handles)) {
|
| - LOG_GETLASTERROR(ERROR)
|
| - << "Failed to create a window station and desktop";
|
| + PLOG(ERROR) << "Failed to create a window station and desktop";
|
| ReportFatalError();
|
| return;
|
| }
|
| @@ -411,7 +409,7 @@ void UnprivilegedProcessDelegate::ReportProcessLaunched(
|
| desired_access,
|
| FALSE,
|
| 0)) {
|
| - LOG_GETLASTERROR(ERROR) << "Failed to duplicate a handle";
|
| + PLOG(ERROR) << "Failed to duplicate a handle";
|
| ReportFatalError();
|
| return;
|
| }
|
|
|