OLD | NEW |
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 <algorithm> | 5 #include <algorithm> |
6 #include <cctype> | 6 #include <cctype> |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <winioctl.h> | 9 #include <winioctl.h> |
10 | 10 |
11 #include "base/win/scoped_handle.h" | 11 #include "base/win/scoped_handle.h" |
12 #include "sandbox/src/nt_internals.h" | 12 #include "sandbox/win/src/nt_internals.h" |
13 #include "sandbox/src/sandbox.h" | 13 #include "sandbox/win/src/sandbox.h" |
14 #include "sandbox/src/sandbox_factory.h" | 14 #include "sandbox/win/src/sandbox_factory.h" |
15 #include "sandbox/src/sandbox_policy.h" | 15 #include "sandbox/win/src/sandbox_policy.h" |
16 #include "sandbox/src/win_utils.h" | 16 #include "sandbox/win/src/win_utils.h" |
17 #include "sandbox/tests/common/controller.h" | 17 #include "sandbox/win/tests/common/controller.h" |
18 #include "sandbox/tests/common/test_utils.h" | 18 #include "sandbox/win/tests/common/test_utils.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 #define BINDNTDLL(name) \ | 21 #define BINDNTDLL(name) \ |
22 name ## Function name = reinterpret_cast<name ## Function>( \ | 22 name ## Function name = reinterpret_cast<name ## Function>( \ |
23 ::GetProcAddress(::GetModuleHandle(L"ntdll.dll"), #name)) | 23 ::GetProcAddress(::GetModuleHandle(L"ntdll.dll"), #name)) |
24 | 24 |
25 namespace sandbox { | 25 namespace sandbox { |
26 | 26 |
27 const ULONG kSharing = FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; | 27 const ULONG kSharing = FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE; |
28 | 28 |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 EXPECT_TRUE(INVALID_HANDLE_VALUE != dir); | 589 EXPECT_TRUE(INVALID_HANDLE_VALUE != dir); |
590 EXPECT_TRUE(DeleteReparsePoint(dir)); | 590 EXPECT_TRUE(DeleteReparsePoint(dir)); |
591 EXPECT_TRUE(::CloseHandle(dir)); | 591 EXPECT_TRUE(::CloseHandle(dir)); |
592 | 592 |
593 // Cleanup. | 593 // Cleanup. |
594 EXPECT_TRUE(::DeleteFile(temp_file_in_temp.c_str())); | 594 EXPECT_TRUE(::DeleteFile(temp_file_in_temp.c_str())); |
595 EXPECT_TRUE(::RemoveDirectory(subfolder.c_str())); | 595 EXPECT_TRUE(::RemoveDirectory(subfolder.c_str())); |
596 } | 596 } |
597 | 597 |
598 } // namespace sandbox | 598 } // namespace sandbox |
OLD | NEW |