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

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

Issue 602763003: Remove implicit HANDLE conversions from remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/launch_process_with_token.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 69a45aa2b595d75b7c3cdeb647d6dcc0b9118a7b..9b22a703bc8ec4fec438a8aef288456f7ecc3345 100644
--- a/remoting/host/win/unprivileged_process_delegate.cc
+++ b/remoting/host/win/unprivileged_process_delegate.cc
@@ -83,7 +83,7 @@ bool CreateRestrictedToken(ScopedHandle* token_out) {
ScopedHandle token(temp_handle);
sandbox::RestrictedToken restricted_token;
- if (restricted_token.Init(token) != ERROR_SUCCESS)
+ if (restricted_token.Init(token.Get()) != ERROR_SUCCESS)
return false;
// Remove all privileges in the token.
@@ -245,7 +245,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
// Determine our logon SID, so we can grant it access to our window station
// and desktop.
- ScopedSid logon_sid = GetLogonSid(token);
+ ScopedSid logon_sid = GetLogonSid(token.Get());
if (!logon_sid) {
PLOG(ERROR) << "Failed to retrieve the logon SID";
ReportFatalError();
@@ -306,7 +306,7 @@ void UnprivilegedProcessDelegate::LaunchProcess(
ScopedHandle worker_thread;
if (!LaunchProcessWithToken(command_line.GetProgram(),
command_line.GetCommandLineString(),
- token,
+ token.Get(),
&process_attributes,
&thread_attributes,
true,
@@ -346,7 +346,7 @@ void UnprivilegedProcessDelegate::KillProcess() {
event_handler_ = NULL;
if (worker_process_.IsValid()) {
- TerminateProcess(worker_process_, CONTROL_C_EXIT);
+ TerminateProcess(worker_process_.Get(), CONTROL_C_EXIT);
worker_process_.Close();
}
}
@@ -361,7 +361,7 @@ bool UnprivilegedProcessDelegate::OnMessageReceived(
void UnprivilegedProcessDelegate::OnChannelConnected(int32 peer_pid) {
DCHECK(CalledOnValidThread());
- DWORD pid = GetProcessId(worker_process_);
+ DWORD pid = GetProcessId(worker_process_.Get());
if (pid != static_cast<DWORD>(peer_pid)) {
LOG(ERROR) << "The actual client PID " << pid
<< " does not match the one reported by the client: "
@@ -402,7 +402,7 @@ void UnprivilegedProcessDelegate::ReportProcessLaunched(
SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION;
HANDLE temp_handle;
if (!DuplicateHandle(GetCurrentProcess(),
- worker_process_,
+ worker_process_.Get(),
GetCurrentProcess(),
&temp_handle,
desired_access,
« no previous file with comments | « remoting/host/win/launch_process_with_token.cc ('k') | remoting/host/win/worker_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698