OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tests/common/controller.h" | 5 #include "sandbox/win/tests/common/controller.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
12 #include "base/win/windows_version.h" | 12 #include "base/win/windows_version.h" |
13 #include "sandbox/src/sandbox_factory.h" | 13 #include "sandbox/win/src/sandbox_factory.h" |
14 #include "sandbox/src/sandbox_utils.h" | 14 #include "sandbox/win/src/sandbox_utils.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 static const int kDefaultTimeout = 3000; | 18 static const int kDefaultTimeout = 3000; |
19 | 19 |
20 // Constructs a full path to a file inside the system32 folder. | 20 // Constructs a full path to a file inside the system32 folder. |
21 std::wstring MakePathToSys32(const wchar_t* name, bool is_obj_man_path) { | 21 std::wstring MakePathToSys32(const wchar_t* name, bool is_obj_man_path) { |
22 wchar_t windows_path[MAX_PATH] = {0}; | 22 wchar_t windows_path[MAX_PATH] = {0}; |
23 if (0 == ::GetSystemWindowsDirectoryW(windows_path, MAX_PATH)) | 23 if (0 == ::GetSystemWindowsDirectoryW(windows_path, MAX_PATH)) |
24 return std::wstring(); | 24 return std::wstring(); |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 target->LowerToken(); | 330 target->LowerToken(); |
331 } else if (0 != _wcsicmp(argv[1], L"-child-no-sandbox")) { | 331 } else if (0 != _wcsicmp(argv[1], L"-child-no-sandbox")) { |
332 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; | 332 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; |
333 } | 333 } |
334 | 334 |
335 return command(argc - 4, argv + 4); | 335 return command(argc - 4, argv + 4); |
336 } | 336 } |
337 | 337 |
338 } // namespace sandbox | 338 } // namespace sandbox |
OLD | NEW |