OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_listener.h" | 5 #include "chrome/nacl/nacl_listener.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 virtual bool ResolveFileToken(struct NaClFileToken* file_token, | 134 virtual bool ResolveFileToken(struct NaClFileToken* file_token, |
135 int32* fd, std::string* path) OVERRIDE { | 135 int32* fd, std::string* path) OVERRIDE { |
136 *fd = -1; | 136 *fd = -1; |
137 *path = ""; | 137 *path = ""; |
138 if (file_token->lo == 0 && file_token->hi == 0) { | 138 if (file_token->lo == 0 && file_token->hi == 0) { |
139 return false; | 139 return false; |
140 } | 140 } |
141 IPC::PlatformFileForTransit ipc_fd; | 141 IPC::PlatformFileForTransit ipc_fd = IPC::InvalidPlatformFileForTransit(); |
142 base::FilePath ipc_path; | 142 base::FilePath ipc_path; |
143 if (!listener_->Send(new NaClProcessMsg_ResolveFileToken(file_token->lo, | 143 if (!listener_->Send(new NaClProcessMsg_ResolveFileToken(file_token->lo, |
144 file_token->hi, | 144 file_token->hi, |
145 &ipc_fd, | 145 &ipc_fd, |
146 &ipc_path))) { | 146 &ipc_path))) { |
147 return false; | 147 return false; |
148 } | 148 } |
149 if (ipc_fd == IPC::InvalidPlatformFileForTransit()) { | 149 if (ipc_fd == IPC::InvalidPlatformFileForTransit()) { |
150 return false; | 150 return false; |
151 } | 151 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 #if defined(OS_WIN) | 309 #if defined(OS_WIN) |
310 args->broker_duplicate_handle_func = BrokerDuplicateHandle; | 310 args->broker_duplicate_handle_func = BrokerDuplicateHandle; |
311 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; | 311 args->attach_debug_exception_handler_func = AttachDebugExceptionHandler; |
312 #endif | 312 #endif |
313 #if defined(OS_LINUX) | 313 #if defined(OS_LINUX) |
314 args->prereserved_sandbox_size = prereserved_sandbox_size_; | 314 args->prereserved_sandbox_size = prereserved_sandbox_size_; |
315 #endif | 315 #endif |
316 NaClChromeMainStart(args); | 316 NaClChromeMainStart(args); |
317 NOTREACHED(); | 317 NOTREACHED(); |
318 } | 318 } |
OLD | NEW |