| 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..389cc1e32354f146816aef490c85f9ac46d60e70 100644
|
| --- a/chrome/installer/setup/setup_util_unittest.cc
|
| +++ b/chrome/installer/setup/setup_util_unittest.cc
|
| @@ -55,13 +55,15 @@ 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(temp_handle);
|
| +
|
| // First get the size of the buffer needed for |privileges| below.
|
| DWORD size;
|
| EXPECT_FALSE(::GetTokenInformation(token, TokenPrivileges, NULL, 0, &size));
|
|
|