Index: chrome/installer/setup/setup_util_unittest.cc |
=================================================================== |
--- chrome/installer/setup/setup_util_unittest.cc (revision 237598) |
+++ chrome/installer/setup/setup_util_unittest.cc (working copy) |
@@ -55,15 +55,13 @@ |
// Returns true if the current process' token has privilege |privilege_name| |
// enabled. |
bool CurrentProcessHasPrivilege(const wchar_t* privilege_name) { |
- HANDLE temp_handle; |
+ base::win::ScopedHandle token; |
if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, |
- &temp_handle)) { |
+ token.Receive())) { |
ADD_FAILURE(); |
return false; |
} |
- base::win::ScopedHandle token(temp_handle); |
- |
// First get the size of the buffer needed for |privileges| below. |
DWORD size; |
EXPECT_FALSE(::GetTokenInformation(token, TokenPrivileges, NULL, 0, &size)); |