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

Side by Side Diff: sandbox/win/tests/common/controller.cc

Issue 10783004: Move Windows Sandbox, trybots version (don't commit me!) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to top of tree 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/tests/common/controller.h ('k') | sandbox/win/tests/common/test_utils.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) 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
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
OLDNEW
« no previous file with comments | « sandbox/win/tests/common/controller.h ('k') | sandbox/win/tests/common/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698