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

Unified Diff: remoting/host/win/unprivileged_process_delegate.cc

Issue 281223002: Removed LOG_GETLASTERROR and LOG_ERRNO macros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wed 05/14/2014 11:20:03.21 Created 6 years, 7 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 | « remoting/host/win/rdp_client_window.cc ('k') | remoting/host/win/worker_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « remoting/host/win/rdp_client_window.cc ('k') | remoting/host/win/worker_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698