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

Side by Side Diff: mojo/nacl/nonsfi/irt_mojo_nonsfi.cc

Issue 2056513002: Plumb MojoReplaceHandleWithReducedRights() out. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_replace_reduce_1
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mojo/nacl/nonsfi/irt_mojo_nonsfi.h" 5 #include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h"
6 6
7 #include "mojo/public/c/system/buffer.h" 7 #include "mojo/public/c/system/buffer.h"
8 #include "mojo/public/c/system/data_pipe.h" 8 #include "mojo/public/c/system/data_pipe.h"
9 #include "mojo/public/c/system/handle.h" 9 #include "mojo/public/c/system/handle.h"
10 #include "mojo/public/c/system/message_pipe.h" 10 #include "mojo/public/c/system/message_pipe.h"
11 #include "mojo/public/c/system/time.h" 11 #include "mojo/public/c/system/time.h"
12 #include "mojo/public/c/system/wait.h" 12 #include "mojo/public/c/system/wait.h"
13 #include "mojo/public/platform/nacl/mgl_irt.h" 13 #include "mojo/public/platform/nacl/mgl_irt.h"
14 #include "mojo/public/platform/nacl/mojo_irt.h" 14 #include "mojo/public/platform/nacl/mojo_irt.h"
15 #include "native_client/src/public/irt_core.h" 15 #include "native_client/src/public/irt_core.h"
16 #include "native_client/src/untrusted/irt/irt_dev.h" 16 #include "native_client/src/untrusted/irt/irt_dev.h"
17 17
18 namespace { 18 namespace {
19 19
20 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; 20 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID;
21 bool g_running_translator = false; 21 bool g_running_translator = false;
22 22
23 const struct nacl_irt_mojo kIrtMojo = { 23 const struct nacl_irt_mojo kIrtMojo = {
24 nacl::MojoGetInitialHandle, 24 nacl::MojoGetInitialHandle,
25 MojoGetTimeTicksNow, 25 MojoGetTimeTicksNow,
26 MojoClose, 26 MojoClose,
27 MojoGetRights, 27 MojoGetRights,
28 MojoReplaceHandleWithReducedRights,
28 MojoDuplicateHandleWithReducedRights, 29 MojoDuplicateHandleWithReducedRights,
29 MojoDuplicateHandle, 30 MojoDuplicateHandle,
30 MojoWait, 31 MojoWait,
31 MojoWaitMany, 32 MojoWaitMany,
32 MojoCreateMessagePipe, 33 MojoCreateMessagePipe,
33 MojoWriteMessage, 34 MojoWriteMessage,
34 MojoReadMessage, 35 MojoReadMessage,
35 MojoCreateDataPipe, 36 MojoCreateDataPipe,
36 MojoSetDataPipeProducerOptions, 37 MojoSetDataPipeProducerOptions,
37 MojoGetDataPipeProducerOptions, 38 MojoGetDataPipeProducerOptions,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void* table, 131 void* table,
131 size_t tablesize) { 132 size_t tablesize) {
132 size_t result = nacl_irt_query_list(interface_ident, table, tablesize, 133 size_t result = nacl_irt_query_list(interface_ident, table, tablesize,
133 kIrtInterfaces, sizeof(kIrtInterfaces)); 134 kIrtInterfaces, sizeof(kIrtInterfaces));
134 if (result != 0) 135 if (result != 0)
135 return result; 136 return result;
136 return nacl_irt_query_core(interface_ident, table, tablesize); 137 return nacl_irt_query_core(interface_ident, table, tablesize);
137 } 138 }
138 139
139 } // namespace nacl 140 } // namespace nacl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698