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

Side by Side Diff: sandbox/win/src/sandbox_utils.cc

Issue 10689170: Move the Windows sandbox to sandbox/win (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on top of tree (properly this time) Created 8 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/src/sandbox_utils.h ('k') | sandbox/win/src/security_level.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_utils.h" 5 #include "sandbox/win/src/sandbox_utils.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
11 #include "sandbox/src/internal_types.h" 11 #include "sandbox/win/src/internal_types.h"
12 #include "sandbox/src/nt_internals.h" 12 #include "sandbox/win/src/nt_internals.h"
13 13
14 namespace sandbox { 14 namespace sandbox {
15 15
16 bool GetModuleHandleHelper(DWORD flags, const wchar_t* module_name, 16 bool GetModuleHandleHelper(DWORD flags, const wchar_t* module_name,
17 HMODULE* module) { 17 HMODULE* module) {
18 DCHECK(module); 18 DCHECK(module);
19 19
20 HMODULE kernel32_base = ::GetModuleHandle(kKerneldllName); 20 HMODULE kernel32_base = ::GetModuleHandle(kKerneldllName);
21 if (!kernel32_base) { 21 if (!kernel32_base) {
22 NOTREACHED(); 22 NOTREACHED();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 HMODULE ntdll = ::GetModuleHandle(kNtdllName); 70 HMODULE ntdll = ::GetModuleHandle(kNtdllName);
71 RtlInitUnicodeString = reinterpret_cast<RtlInitUnicodeStringFunction>( 71 RtlInitUnicodeString = reinterpret_cast<RtlInitUnicodeStringFunction>(
72 GetProcAddress(ntdll, "RtlInitUnicodeString")); 72 GetProcAddress(ntdll, "RtlInitUnicodeString"));
73 DCHECK(RtlInitUnicodeString); 73 DCHECK(RtlInitUnicodeString);
74 } 74 }
75 RtlInitUnicodeString(uni_name, name.c_str()); 75 RtlInitUnicodeString(uni_name, name.c_str());
76 InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL); 76 InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL);
77 } 77 }
78 78
79 }; // namespace sandbox 79 }; // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/sandbox_utils.h ('k') | sandbox/win/src/security_level.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698