Chromium Code Reviews| Index: chrome/installer/setup/setup_util_unittest.cc |
| diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc |
| index 647d90f77bf820739a6de01bf207227ca05ab655..dbc3ba092c510eec103492a4fd4f45ea45155acc 100644 |
| --- a/chrome/installer/setup/setup_util_unittest.cc |
| +++ b/chrome/installer/setup/setup_util_unittest.cc |
| @@ -55,13 +55,16 @@ static const wchar_t kTestedPrivilege[] = SE_RESTORE_NAME; |
| // Returns true if the current process' token has privilege |privilege_name| |
| // enabled. |
| bool CurrentProcessHasPrivilege(const wchar_t* privilege_name) { |
| - base::win::ScopedHandle token; |
| + HANDLE temp_handle; |
| if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, |
| - token.Receive())) { |
| + &temp_handle)) { |
| ADD_FAILURE(); |
| return false; |
| } |
| + base::win::ScopedHandle token; |
| + token.Set(temp_handle); |
|
cpu_(ooo_6.6-7.5)
2013/11/22 02:42:53
and for ScopedHandle too?
rvargas (doing something else)
2013/11/25 19:53:27
Done.
|
| + |
| // First get the size of the buffer needed for |privileges| below. |
| DWORD size; |
| EXPECT_FALSE(::GetTokenInformation(token, TokenPrivileges, NULL, 0, &size)); |