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

Unified Diff: chrome/installer/setup/setup_util.cc

Issue 606473002: Remove implicit HANDLE conversions from chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove spurious file and fix indent (+rebase) 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 | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_util.cc
diff --git a/chrome/installer/setup/setup_util.cc b/chrome/installer/setup/setup_util.cc
index 3a7bde7a362b529084d7c12b9cc5f80064758be4..3e0a3d9dc61c0daa830a70c90f561ebb4978105b 100644
--- a/chrome/installer/setup/setup_util.cc
+++ b/chrome/installer/setup/setup_util.cc
@@ -479,7 +479,8 @@ ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name)
tp.Privileges[0].Luid = privilege_luid;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
DWORD return_length;
- if (!::AdjustTokenPrivileges(token_, FALSE, &tp, sizeof(TOKEN_PRIVILEGES),
+ if (!::AdjustTokenPrivileges(token_.Get(), FALSE, &tp,
+ sizeof(TOKEN_PRIVILEGES),
&previous_privileges_, &return_length)) {
token_.Close();
return;
@@ -490,7 +491,7 @@ ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name)
ScopedTokenPrivilege::~ScopedTokenPrivilege() {
if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) {
- ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_,
+ ::AdjustTokenPrivileges(token_.Get(), FALSE, &previous_privileges_,
sizeof(TOKEN_PRIVILEGES), NULL, NULL);
}
}
« no previous file with comments | « chrome/installer/gcapi/gcapi.cc ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698