OLD | NEW |
1 // Copyright (c) 2011 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" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "content/common/sandbox_mac.h" | 13 #include "content/common/sandbox_mac.h" |
14 #include "content/public/common/sandbox_init.h" | 14 #include "content/public/common/sandbox_init.h" |
15 | 15 |
16 NaClMainPlatformDelegate::NaClMainPlatformDelegate( | 16 NaClMainPlatformDelegate::NaClMainPlatformDelegate( |
17 const MainFunctionParams& parameters) | 17 const content::MainFunctionParams& parameters) |
18 : parameters_(parameters), sandbox_test_module_(NULL) { | 18 : parameters_(parameters), sandbox_test_module_(NULL) { |
19 } | 19 } |
20 | 20 |
21 NaClMainPlatformDelegate::~NaClMainPlatformDelegate() { | 21 NaClMainPlatformDelegate::~NaClMainPlatformDelegate() { |
22 } | 22 } |
23 | 23 |
24 // TODO(jvoung): see if this old comment (from renderer_main_platform...) | 24 // TODO(jvoung): see if this old comment (from renderer_main_platform...) |
25 // is relevant to the nacl loader. | 25 // is relevant to the nacl loader. |
26 // TODO(mac-port): Any code needed to initialize a process for purposes of | 26 // TODO(mac-port): Any code needed to initialize a process for purposes of |
27 // running a NaClLoader needs to also be reflected in chrome_main.cc for | 27 // running a NaClLoader needs to also be reflected in chrome_main.cc for |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 result = (*run_security_tests)(); | 72 result = (*run_security_tests)(); |
73 } else { | 73 } else { |
74 VLOG(1) << "Failed to get NaCl sandbox test function"; | 74 VLOG(1) << "Failed to get NaCl sandbox test function"; |
75 result = false; | 75 result = false; |
76 } | 76 } |
77 base::UnloadNativeLibrary(sandbox_test_module_); | 77 base::UnloadNativeLibrary(sandbox_test_module_); |
78 sandbox_test_module_ = NULL; | 78 sandbox_test_module_ = NULL; |
79 } | 79 } |
80 return result; | 80 return result; |
81 } | 81 } |
OLD | NEW |