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

Side by Side Diff: sandbox/win/src/file_policy_test.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/eat_resolver.cc ('k') | sandbox/win/src/filesystem_dispatcher.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 <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
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
OLDNEW
« no previous file with comments | « sandbox/win/src/eat_resolver.cc ('k') | sandbox/win/src/filesystem_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698