| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/nacl/nacl_main_platform_delegate.h" | 5 #include "chrome/nacl/nacl_main_platform_delegate.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "chrome/common/chrome_constants.h" | 7 #include "chrome/common/chrome_constants.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "sandbox/src/sandbox.h" | 9 #include "sandbox/src/sandbox.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { | 27 void NaClMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { |
| 28 const CommandLine& command_line = parameters_.command_line_; | 28 const CommandLine& command_line = parameters_.command_line_; |
| 29 | 29 |
| 30 DLOG(INFO) << "Started NaClLdr with " << command_line.command_line_string(); | 30 DLOG(INFO) << "Started NaClLdr with " << command_line.command_line_string(); |
| 31 | 31 |
| 32 sandbox::TargetServices* target_services = | 32 sandbox::TargetServices* target_services = |
| 33 parameters_.sandbox_info_.TargetServices(); | 33 parameters_.sandbox_info_.TargetServices(); |
| 34 | 34 |
| 35 if (target_services && !no_sandbox) { | 35 if (target_services && !no_sandbox) { |
| 36 std::wstring test_dll_name = | 36 std::wstring test_dll_name = |
| 37 command_line.GetSwitchValue(switches::kTestNaClSandbox); | 37 command_line.GetSwitchValueNative(switches::kTestNaClSandbox); |
| 38 if (!test_dll_name.empty()) { | 38 if (!test_dll_name.empty()) { |
| 39 // At this point, hack on the suffix according to with bitness | 39 // At this point, hack on the suffix according to with bitness |
| 40 // of your windows process. | 40 // of your windows process. |
| 41 #if defined(_WIN64) | 41 #if defined(_WIN64) |
| 42 DLOG(INFO) << "Using 64-bit test dll\n"; | 42 DLOG(INFO) << "Using 64-bit test dll\n"; |
| 43 test_dll_name.append(L"64.dll"); | 43 test_dll_name.append(L"64.dll"); |
| 44 #else | 44 #else |
| 45 DLOG(INFO) << "Using 32-bit test dll\n"; | 45 DLOG(INFO) << "Using 32-bit test dll\n"; |
| 46 test_dll_name.append(L".dll"); | 46 test_dll_name.append(L".dll"); |
| 47 #endif | 47 #endif |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 | 76 |
| 77 CHECK(run_security_tests); | 77 CHECK(run_security_tests); |
| 78 if (run_security_tests) { | 78 if (run_security_tests) { |
| 79 DLOG(INFO) << "Running NaCl Loader security tests"; | 79 DLOG(INFO) << "Running NaCl Loader security tests"; |
| 80 CHECK((*run_security_tests)()); | 80 CHECK((*run_security_tests)()); |
| 81 } | 81 } |
| 82 FreeLibrary(sandbox_test_module_); | 82 FreeLibrary(sandbox_test_module_); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| OLD | NEW |