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

Side by Side Diff: sandbox/src/sandbox_nt_util.cc

Issue 10332002: win: Fix a few minor issues found by clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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/src/Wow64.cc ('k') | sandbox/src/target_process.h » ('j') | 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) 2006-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2010 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 "sandbox/src/sandbox_nt_util.h" 5 #include "sandbox/src/sandbox_nt_util.h"
6 6
7 #include "base/win/pe_image.h" 7 #include "base/win/pe_image.h"
8 #include "sandbox/src/sandbox_factory.h" 8 #include "sandbox/src/sandbox_factory.h"
9 #include "sandbox/src/target_services.h" 9 #include "sandbox/src/target_services.h"
10 10
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 531 }
532 532
533 } // namespace sandbox 533 } // namespace sandbox
534 534
535 void* operator new(size_t size, sandbox::AllocationType type, 535 void* operator new(size_t size, sandbox::AllocationType type,
536 void* near_to) { 536 void* near_to) {
537 using namespace sandbox; 537 using namespace sandbox;
538 538
539 if (NT_ALLOC == type) { 539 if (NT_ALLOC == type) {
540 if (!InitHeap()) 540 if (!InitHeap())
541 return false; 541 return NULL;
542 542
543 // Use default flags for the allocation. 543 // Use default flags for the allocation.
544 return g_nt.RtlAllocateHeap(sandbox::g_heap, 0, size); 544 return g_nt.RtlAllocateHeap(sandbox::g_heap, 0, size);
545 } else if (NT_PAGE == type) { 545 } else if (NT_PAGE == type) {
546 return AllocateNearTo(near_to, size); 546 return AllocateNearTo(near_to, size);
547 } 547 }
548 NOTREACHED_NT(); 548 NOTREACHED_NT();
549 return NULL; 549 return NULL;
550 } 550 }
551 551
(...skipping 25 matching lines...) Expand all
577 UNREFERENCED_PARAMETER(type); 577 UNREFERENCED_PARAMETER(type);
578 return buffer; 578 return buffer;
579 } 579 }
580 580
581 void __cdecl operator delete(void* memory, void* buffer, 581 void __cdecl operator delete(void* memory, void* buffer,
582 sandbox::AllocationType type) { 582 sandbox::AllocationType type) {
583 UNREFERENCED_PARAMETER(memory); 583 UNREFERENCED_PARAMETER(memory);
584 UNREFERENCED_PARAMETER(buffer); 584 UNREFERENCED_PARAMETER(buffer);
585 UNREFERENCED_PARAMETER(type); 585 UNREFERENCED_PARAMETER(type);
586 } 586 }
OLDNEW
« no previous file with comments | « sandbox/src/Wow64.cc ('k') | sandbox/src/target_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698