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

Side by Side Diff: sandbox/win/tests/validation_tests/commands.cc

Issue 382613002: Fixes for re-enabling more MSVC level 4 warnings: sandbox/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments + cleanup 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
« no previous file with comments | « sandbox/win/tests/common/controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <Aclapi.h> 5 #include <Aclapi.h>
6 #include <windows.h> 6 #include <windows.h>
7 #include <string> 7 #include <string>
8 8
9 #include "sandbox/win/tests/validation_tests/commands.h" 9 #include "sandbox/win/tests/validation_tests/commands.h"
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ::CloseHandle(test_handle); 269 ::CloseHandle(test_handle);
270 if (result != ERROR_ACCESS_DENIED) { 270 if (result != ERROR_ACCESS_DENIED) {
271 return SBOX_TEST_SUCCEEDED; 271 return SBOX_TEST_SUCCEEDED;
272 } 272 }
273 } else if (::GetLastError() != ERROR_ACCESS_DENIED) { 273 } else if (::GetLastError() != ERROR_ACCESS_DENIED) {
274 return SBOX_TEST_FAILED; 274 return SBOX_TEST_FAILED;
275 } 275 }
276 } 276 }
277 277
278 // Open by name with WRITE_DAC. 278 // Open by name with WRITE_DAC.
279 if ((desktop = ::OpenDesktop(desktop_name, 0, FALSE, WRITE_DAC)) || 279 desktop = ::OpenDesktop(desktop_name, 0, FALSE, WRITE_DAC);
280 ::GetLastError() != ERROR_ACCESS_DENIED) { 280 if (desktop || ::GetLastError() != ERROR_ACCESS_DENIED) {
281 ::CloseDesktop(desktop); 281 ::CloseDesktop(desktop);
282 return SBOX_TEST_SUCCEEDED; 282 return SBOX_TEST_SUCCEEDED;
283 } 283 }
284 284
285 return SBOX_TEST_DENIED; 285 return SBOX_TEST_DENIED;
286 } 286 }
287 287
288 BOOL CALLBACK DesktopTestEnumProc(LPTSTR desktop_name, LPARAM result) { 288 BOOL CALLBACK DesktopTestEnumProc(LPTSTR desktop_name, LPARAM result) {
289 return TRUE; 289 return TRUE;
290 } 290 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 if (!::VirtualFree(memory, 0, MEM_RELEASE)) 326 if (!::VirtualFree(memory, 0, MEM_RELEASE))
327 return SBOX_TEST_FAILED; 327 return SBOX_TEST_FAILED;
328 328
329 return SBOX_TEST_SUCCEEDED; 329 return SBOX_TEST_SUCCEEDED;
330 } 330 }
331 331
332 332
333 } // namespace sandbox 333 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/tests/common/controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698