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

Side by Side Diff: components/nacl/loader/nacl_listener.cc

Issue 877993004: Revert "Update mojo sdk to rev 8d45c89c30b230843c5bd6dd0693a555750946c0" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | mojo/cc/output_surface_mojo.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/loader/nacl_listener.h" 5 #include "components/nacl/loader/nacl_listener.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 17 matching lines...) Expand all
28 #include "ipc/ipc_switches.h" 28 #include "ipc/ipc_switches.h"
29 #include "ipc/ipc_sync_channel.h" 29 #include "ipc/ipc_sync_channel.h"
30 #include "ipc/ipc_sync_message_filter.h" 30 #include "ipc/ipc_sync_message_filter.h"
31 #include "mojo/nacl/mojo_syscall.h" 31 #include "mojo/nacl/mojo_syscall.h"
32 #include "native_client/src/public/chrome_main.h" 32 #include "native_client/src/public/chrome_main.h"
33 #include "native_client/src/public/nacl_app.h" 33 #include "native_client/src/public/nacl_app.h"
34 #include "native_client/src/public/nacl_desc.h" 34 #include "native_client/src/public/nacl_desc.h"
35 #include "native_client/src/public/nacl_file_info.h" 35 #include "native_client/src/public/nacl_file_info.h"
36 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h" 36 #include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
37 #include "third_party/mojo/src/mojo/edk/embedder/platform_support.h" 37 #include "third_party/mojo/src/mojo/edk/embedder/platform_support.h"
38 #include "third_party/mojo/src/mojo/edk/embedder/simple_platform_support.h"
39 38
40 #if defined(OS_POSIX) 39 #if defined(OS_POSIX)
41 #include "base/file_descriptor_posix.h" 40 #include "base/file_descriptor_posix.h"
42 #endif 41 #endif
43 42
44 #if defined(OS_LINUX) 43 #if defined(OS_LINUX)
45 #include "content/public/common/child_process_sandbox_support_linux.h" 44 #include "content/public/common/child_process_sandbox_support_linux.h"
46 #endif 45 #endif
47 46
48 #if defined(OS_WIN) 47 #if defined(OS_WIN)
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 params.nexe_file); 426 params.nexe_file);
428 std::string file_path_str = params.nexe_file_path_metadata.AsUTF8Unsafe(); 427 std::string file_path_str = params.nexe_file_path_metadata.AsUTF8Unsafe();
429 args->nexe_desc = NaClDescCreateWithFilePathMetadata(nexe_file, 428 args->nexe_desc = NaClDescCreateWithFilePathMetadata(nexe_file,
430 file_path_str.c_str()); 429 file_path_str.c_str());
431 430
432 #if defined(OS_POSIX) 431 #if defined(OS_POSIX)
433 if (params.enable_mojo) { 432 if (params.enable_mojo) {
434 #if !defined(OS_MACOSX) 433 #if !defined(OS_MACOSX)
435 // Don't call mojo::embedder::Init on Mac; it's already been called from 434 // Don't call mojo::embedder::Init on Mac; it's already been called from
436 // ChromeMain() (see chrome/app/chrome_exe_main_mac.cc). 435 // ChromeMain() (see chrome/app/chrome_exe_main_mac.cc).
437 mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>( 436 mojo::embedder::Init(scoped_ptr<mojo::embedder::PlatformSupport>());
438 new mojo::embedder::SimplePlatformSupport()));
439 #endif 437 #endif
440 // InjectMojo adds a file descriptor to the process that allows Mojo calls 438 // InjectMojo adds a file descriptor to the process that allows Mojo calls
441 // to use an implementation defined outside the NaCl sandbox. See 439 // to use an implementation defined outside the NaCl sandbox. See
442 // //mojo/nacl for implementation details. 440 // //mojo/nacl for implementation details.
443 InjectMojo(nap); 441 InjectMojo(nap);
444 } else { 442 } else {
445 // When Mojo isn't enabled, we inject a file descriptor that intentionally 443 // When Mojo isn't enabled, we inject a file descriptor that intentionally
446 // fails on any imc_sendmsg() call to make debugging easier. 444 // fails on any imc_sendmsg() call to make debugging easier.
447 InjectDisabledMojo(nap); 445 InjectDisabledMojo(nap);
448 } 446 }
(...skipping 22 matching lines...) Expand all
471 } 469 }
472 470
473 void NaClListener::OnFileTokenResolved( 471 void NaClListener::OnFileTokenResolved(
474 uint64_t token_lo, 472 uint64_t token_lo,
475 uint64_t token_hi, 473 uint64_t token_hi,
476 IPC::PlatformFileForTransit ipc_fd, 474 IPC::PlatformFileForTransit ipc_fd,
477 base::FilePath file_path) { 475 base::FilePath file_path) {
478 resolved_cb_.Run(ipc_fd, file_path); 476 resolved_cb_.Run(ipc_fd, file_path);
479 resolved_cb_.Reset(); 477 resolved_cb_.Reset();
480 } 478 }
OLDNEW
« no previous file with comments | « no previous file | mojo/cc/output_surface_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698