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

Side by Side Diff: chrome/installer/setup/setup_util.cc

Issue 377683002: Fixes for re-enabling more MSVC level 4 warnings: chrome/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file declares util functions for setup project. 5 // This file declares util functions for setup project.
6 6
7 #include "chrome/installer/setup/setup_util.h" 7 #include "chrome/installer/setup/setup_util.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 ok = FALSE; 235 ok = FALSE;
236 } else { 236 } else {
237 ::QueueUserAPC(sleep, pi.hThread, delay_before_delete_ms); 237 ::QueueUserAPC(sleep, pi.hThread, delay_before_delete_ms);
238 ::QueueUserAPC(delete_file, pi.hThread, 238 ::QueueUserAPC(delete_file, pi.hThread,
239 reinterpret_cast<ULONG_PTR>(mem)); 239 reinterpret_cast<ULONG_PTR>(mem));
240 ::QueueUserAPC(exit_process, pi.hThread, 0); 240 ::QueueUserAPC(exit_process, pi.hThread, 0);
241 ::ResumeThread(pi.hThread); 241 ::ResumeThread(pi.hThread);
242 } 242 }
243 } else { 243 } else {
244 PLOG(ERROR) << "VirtualAllocEx"; 244 PLOG(ERROR) << "VirtualAllocEx";
245 ::TerminateProcess(pi.hProcess, ~0); 245 ::TerminateProcess(pi.hProcess, ~static_cast<UINT>(0));
246 } 246 }
247 ::CloseHandle(pi.hThread); 247 ::CloseHandle(pi.hThread);
248 ::CloseHandle(pi.hProcess); 248 ::CloseHandle(pi.hProcess);
249 } 249 }
250 250
251 return ok != FALSE; 251 return ok != FALSE;
252 } 252 }
253 253
254 bool GetExistingHigherInstaller( 254 bool GetExistingHigherInstaller(
255 const InstallationState& original_state, 255 const InstallationState& original_state,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } 489 }
490 490
491 ScopedTokenPrivilege::~ScopedTokenPrivilege() { 491 ScopedTokenPrivilege::~ScopedTokenPrivilege() {
492 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) { 492 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) {
493 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_, 493 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_,
494 sizeof(TOKEN_PRIVILEGES), NULL, NULL); 494 sizeof(TOKEN_PRIVILEGES), NULL, NULL);
495 } 495 }
496 } 496 }
497 497
498 } // namespace installer 498 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698