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

Side by Side Diff: chrome/nacl/nacl_main_platform_delegate_mac.mm

Issue 6864020: linux: don't always print dlopen errors from LoadNativeLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: owners Created 9 years, 8 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 | « chrome/common/pepper_plugin_registry.cc ('k') | chrome/nacl/nacl_main_platform_delegate_win.cc » ('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) 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 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/native_library.h" 11 #include "base/native_library.h"
(...skipping 28 matching lines...) Expand all
40 ii != argstrings.end(); ++ii) 40 ii != argstrings.end(); ++ii)
41 DVLOG(1) << *ii; 41 DVLOG(1) << *ii;
42 42
43 // Be sure not to load the sandbox test DLL if the sandbox isn't on. 43 // Be sure not to load the sandbox test DLL if the sandbox isn't on.
44 // Comment-out guard and recompile if you REALLY want to test w/out the SB. 44 // Comment-out guard and recompile if you REALLY want to test w/out the SB.
45 // TODO(jvoung): allow testing without sandbox, but change expected ret vals. 45 // TODO(jvoung): allow testing without sandbox, but change expected ret vals.
46 if (!no_sandbox) { 46 if (!no_sandbox) {
47 FilePath test_dll_name = 47 FilePath test_dll_name =
48 command_line.GetSwitchValuePath(switches::kTestNaClSandbox); 48 command_line.GetSwitchValuePath(switches::kTestNaClSandbox);
49 if (!test_dll_name.empty()) { 49 if (!test_dll_name.empty()) {
50 sandbox_test_module_ = base::LoadNativeLibrary(test_dll_name); 50 sandbox_test_module_ = base::LoadNativeLibrary(test_dll_name, NULL);
51 CHECK(sandbox_test_module_); 51 CHECK(sandbox_test_module_);
52 } 52 }
53 } 53 }
54 } 54 }
55 55
56 void NaClMainPlatformDelegate::EnableSandbox() { 56 void NaClMainPlatformDelegate::EnableSandbox() {
57 CommandLine* parsed_command_line = CommandLine::ForCurrentProcess(); 57 CommandLine* parsed_command_line = CommandLine::ForCurrentProcess();
58 SandboxInitWrapper sandbox_wrapper; 58 SandboxInitWrapper sandbox_wrapper;
59 bool sandbox_initialized_ok = 59 bool sandbox_initialized_ok =
60 sandbox_wrapper.InitializeSandbox(*parsed_command_line, 60 sandbox_wrapper.InitializeSandbox(*parsed_command_line,
(...skipping 15 matching lines...) Expand all
76 result = (*run_security_tests)(); 76 result = (*run_security_tests)();
77 } else { 77 } else {
78 VLOG(1) << "Failed to get NaCl sandbox test function"; 78 VLOG(1) << "Failed to get NaCl sandbox test function";
79 result = false; 79 result = false;
80 } 80 }
81 base::UnloadNativeLibrary(sandbox_test_module_); 81 base::UnloadNativeLibrary(sandbox_test_module_);
82 sandbox_test_module_ = NULL; 82 sandbox_test_module_ = NULL;
83 } 83 }
84 return result; 84 return result;
85 } 85 }
OLDNEW
« no previous file with comments | « chrome/common/pepper_plugin_registry.cc ('k') | chrome/nacl/nacl_main_platform_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698