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

Unified Diff: remoting/host/win/chromoting_module.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/setup/daemon_controller_delegate_win.cc ('k') | remoting/host/win/elevated_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/chromoting_module.cc
diff --git a/remoting/host/win/chromoting_module.cc b/remoting/host/win/chromoting_module.cc
index 1d7a37ea8020e8ed31ed27d2e2e47b25f76a1426..d12ab29e4a2081005f188be1cbff4d9581530573 100644
--- a/remoting/host/win/chromoting_module.cc
+++ b/remoting/host/win/chromoting_module.cc
@@ -54,7 +54,7 @@ bool LowerProcessIntegrityLevel(DWORD max_level) {
DWORD length = 0;
// Get the size of the buffer needed to hold the mandatory label.
- BOOL result = GetTokenInformation(token, TokenIntegrityLevel,
+ BOOL result = GetTokenInformation(token.Get(), TokenIntegrityLevel,
mandatory_label.get(), length, &length);
if (!result && GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
// Allocate a buffer that is large enough.
@@ -62,7 +62,7 @@ bool LowerProcessIntegrityLevel(DWORD max_level) {
mandatory_label.Swap(buffer);
// Get the the mandatory label.
- result = GetTokenInformation(token, TokenIntegrityLevel,
+ result = GetTokenInformation(token.Get(), TokenIntegrityLevel,
mandatory_label.get(), length, &length);
}
if (!result) {
@@ -79,8 +79,8 @@ bool LowerProcessIntegrityLevel(DWORD max_level) {
// Set the integrity level to |max_level| if needed.
if (*current_level > max_level) {
*current_level = max_level;
- if (!SetTokenInformation(token, TokenIntegrityLevel, mandatory_label.get(),
- length)) {
+ if (!SetTokenInformation(token.Get(), TokenIntegrityLevel,
+ mandatory_label.get(), length)) {
PLOG(ERROR) << "Failed to set the mandatory label";
return false;
}
« no previous file with comments | « remoting/host/setup/daemon_controller_delegate_win.cc ('k') | remoting/host/win/elevated_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698