| OLD | NEW |
| 1 // Copyright (c) 2010 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 "chrome/nacl/nacl_main_platform_delegate.h" | 5 #include "chrome/nacl/nacl_main_platform_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
| 11 #include "chrome/common/chrome_constants.h" | 11 #include "chrome/common/chrome_constants.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // of your windows process. | 44 // of your windows process. |
| 45 #if defined(_WIN64) | 45 #if defined(_WIN64) |
| 46 DVLOG(1) << "Using 64-bit test dll\n"; | 46 DVLOG(1) << "Using 64-bit test dll\n"; |
| 47 test_dll_name = test_dll_name.InsertBeforeExtension(L"64"); | 47 test_dll_name = test_dll_name.InsertBeforeExtension(L"64"); |
| 48 test_dll_name = test_dll_name.ReplaceExtension(L"dll"); | 48 test_dll_name = test_dll_name.ReplaceExtension(L"dll"); |
| 49 #else | 49 #else |
| 50 DVLOG(1) << "Using 32-bit test dll\n"; | 50 DVLOG(1) << "Using 32-bit test dll\n"; |
| 51 test_dll_name = test_dll_name.ReplaceExtension(L"dll"); | 51 test_dll_name = test_dll_name.ReplaceExtension(L"dll"); |
| 52 #endif | 52 #endif |
| 53 DVLOG(1) << "Loading test lib " << test_dll_name.value() << "\n"; | 53 DVLOG(1) << "Loading test lib " << test_dll_name.value() << "\n"; |
| 54 sandbox_test_module_ = base::LoadNativeLibrary(test_dll_name); | 54 sandbox_test_module_ = base::LoadNativeLibrary(test_dll_name, NULL); |
| 55 CHECK(sandbox_test_module_); | 55 CHECK(sandbox_test_module_); |
| 56 VLOG(1) << "Testing NaCl sandbox\n"; | 56 VLOG(1) << "Testing NaCl sandbox\n"; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 void NaClMainPlatformDelegate::EnableSandbox() { | 61 void NaClMainPlatformDelegate::EnableSandbox() { |
| 62 sandbox::TargetServices* target_services = | 62 sandbox::TargetServices* target_services = |
| 63 parameters_.sandbox_info_.TargetServices(); | 63 parameters_.sandbox_info_.TargetServices(); |
| 64 | 64 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 83 result = (*run_security_tests)(); | 83 result = (*run_security_tests)(); |
| 84 } else { | 84 } else { |
| 85 VLOG(1) << "Failed to get NaCl sandbox test function"; | 85 VLOG(1) << "Failed to get NaCl sandbox test function"; |
| 86 result = false; | 86 result = false; |
| 87 } | 87 } |
| 88 base::UnloadNativeLibrary(sandbox_test_module_); | 88 base::UnloadNativeLibrary(sandbox_test_module_); |
| 89 sandbox_test_module_ = NULL; | 89 sandbox_test_module_ = NULL; |
| 90 } | 90 } |
| 91 return result; | 91 return result; |
| 92 } | 92 } |
| OLD | NEW |