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

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

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 8 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
« 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sandbox/win/src/sandbox_utils.h"
6
7 #include <windows.h>
8
9 #include "base/logging.h"
10 #include "sandbox/win/src/internal_types.h"
11
12 namespace sandbox {
13
14 void InitObjectAttribs(const base::string16& name,
15 ULONG attributes,
16 HANDLE root,
17 OBJECT_ATTRIBUTES* obj_attr,
18 UNICODE_STRING* uni_name,
19 SECURITY_QUALITY_OF_SERVICE* security_qos) {
20 static RtlInitUnicodeStringFunction RtlInitUnicodeString;
21 if (!RtlInitUnicodeString) {
22 HMODULE ntdll = ::GetModuleHandle(kNtdllName);
23 RtlInitUnicodeString = reinterpret_cast<RtlInitUnicodeStringFunction>(
24 GetProcAddress(ntdll, "RtlInitUnicodeString"));
25 DCHECK(RtlInitUnicodeString);
26 }
27 RtlInitUnicodeString(uni_name, name.c_str());
28 InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL);
29 obj_attr->SecurityQualityOfService = security_qos;
30 }
31
32 } // 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