| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/renderer/renderer_main_platform_delegate.h" | 5 #include "chrome/renderer/renderer_main_platform_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { | 95 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { |
| 96 const CommandLine& command_line = parameters_.command_line_; | 96 const CommandLine& command_line = parameters_.command_line_; |
| 97 | 97 |
| 98 DLOG(INFO) << "Started renderer with " << command_line.command_line_string(); | 98 DLOG(INFO) << "Started renderer with " << command_line.command_line_string(); |
| 99 | 99 |
| 100 sandbox::TargetServices* target_services = | 100 sandbox::TargetServices* target_services = |
| 101 parameters_.sandbox_info_.TargetServices(); | 101 parameters_.sandbox_info_.TargetServices(); |
| 102 | 102 |
| 103 if (target_services && !no_sandbox) { | 103 if (target_services && !no_sandbox) { |
| 104 std::wstring test_dll_name = | 104 std::wstring test_dll_name = |
| 105 command_line.GetSwitchValue(switches::kTestSandbox); | 105 command_line.GetSwitchValueNative(switches::kTestSandbox); |
| 106 if (!test_dll_name.empty()) { | 106 if (!test_dll_name.empty()) { |
| 107 sandbox_test_module_ = LoadLibrary(test_dll_name.c_str()); | 107 sandbox_test_module_ = LoadLibrary(test_dll_name.c_str()); |
| 108 DCHECK(sandbox_test_module_); | 108 DCHECK(sandbox_test_module_); |
| 109 if (!sandbox_test_module_) { | 109 if (!sandbox_test_module_) { |
| 110 return false; | 110 return false; |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 132 kRenderTestCall)); | 132 kRenderTestCall)); |
| 133 DCHECK(run_security_tests); | 133 DCHECK(run_security_tests); |
| 134 if (run_security_tests) { | 134 if (run_security_tests) { |
| 135 int test_count = 0; | 135 int test_count = 0; |
| 136 DLOG(INFO) << "Running renderer security tests"; | 136 DLOG(INFO) << "Running renderer security tests"; |
| 137 BOOL result = run_security_tests(&test_count); | 137 BOOL result = run_security_tests(&test_count); |
| 138 CHECK(result) << "Test number " << test_count << " has failed."; | 138 CHECK(result) << "Test number " << test_count << " has failed."; |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 } | 141 } |
| OLD | NEW |