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

Side by Side Diff: content/common/sandbox_win.cc

Issue 377723002: Fixes for re-enabling more MSVC level 4 warnings: content/ 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 #include "content/common/sandbox_win.h" 5 #include "content/common/sandbox_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 OBJECT_BASIC_INFORMATION basic_info; 424 OBJECT_BASIC_INFORMATION basic_info;
425 size = sizeof(basic_info); 425 size = sizeof(basic_info);
426 error = g_QueryObject(handle, ObjectBasicInformation, &basic_info, size, 426 error = g_QueryObject(handle, ObjectBasicInformation, &basic_info, size,
427 &size); 427 &size);
428 CHECK(NT_SUCCESS(error)); 428 CHECK(NT_SUCCESS(error));
429 429
430 CHECK(!(basic_info.GrantedAccess & WRITE_DAC)) << 430 CHECK(!(basic_info.GrantedAccess & WRITE_DAC)) <<
431 kDuplicateHandleWarning; 431 kDuplicateHandleWarning;
432 432
433 if (0 == _wcsicmp(type_info->Name.Buffer, L"Process")) { 433 if (0 == _wcsicmp(type_info->Name.Buffer, L"Process")) {
434 const ACCESS_MASK kDangerousMask = ~(PROCESS_QUERY_LIMITED_INFORMATION | 434 const ACCESS_MASK kDangerousMask =
435 SYNCHRONIZE); 435 ~static_cast<DWORD>(PROCESS_QUERY_LIMITED_INFORMATION | SYNCHRONIZE);
436 CHECK(!(basic_info.GrantedAccess & kDangerousMask)) << 436 CHECK(!(basic_info.GrantedAccess & kDangerousMask)) <<
437 kDuplicateHandleWarning; 437 kDuplicateHandleWarning;
438 } 438 }
439 } 439 }
440 440
441 BOOL WINAPI DuplicateHandlePatch(HANDLE source_process_handle, 441 BOOL WINAPI DuplicateHandlePatch(HANDLE source_process_handle,
442 HANDLE source_handle, 442 HANDLE source_handle,
443 HANDLE target_process_handle, 443 HANDLE target_process_handle,
444 LPHANDLE target_handle, 444 LPHANDLE target_handle,
445 DWORD desired_access, 445 DWORD desired_access,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 774 }
775 775
776 return false; 776 return false;
777 } 777 }
778 778
779 bool BrokerAddTargetPeer(HANDLE peer_process) { 779 bool BrokerAddTargetPeer(HANDLE peer_process) {
780 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 780 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
781 } 781 }
782 782
783 } // namespace content 783 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/dxva_video_decode_accelerator.h ('k') | content/common/ssl_status_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698