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

Side by Side Diff: mojo/public/platform/native/system_impl_private_thunks.c

Issue 2000253002: Add thunks for MojoDuplicateHandle[WithReducedRights](). (Closed) Base URL: https://github.com/domokit/mojo.git@work792_dup_handle_1
Patch Set: Created 4 years, 7 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/public/platform/native/system_impl_private_thunks.h" 5 #include "mojo/public/platform/native/system_impl_private_thunks.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 8
9 #include "mojo/public/platform/native/thunk_export.h" 9 #include "mojo/public/platform/native/thunk_export.h"
10 10
(...skipping 30 matching lines...) Expand all
41 return g_system_impl_thunks.Close(system, handle); 41 return g_system_impl_thunks.Close(system, handle);
42 } 42 }
43 43
44 MojoResult MojoSystemImplGetRights(MojoSystemImpl system, 44 MojoResult MojoSystemImplGetRights(MojoSystemImpl system,
45 MojoHandle handle, 45 MojoHandle handle,
46 MojoHandleRights* rights) { 46 MojoHandleRights* rights) {
47 assert(g_system_impl_thunks.GetRights); 47 assert(g_system_impl_thunks.GetRights);
48 return g_system_impl_thunks.GetRights(system, handle, rights); 48 return g_system_impl_thunks.GetRights(system, handle, rights);
49 } 49 }
50 50
51 MojoResult MojoSystemImplDuplicateHandleWithReducedRights(
52 MojoSystemImpl system,
53 MojoHandle handle,
54 MojoHandleRights rights_to_remove,
55 MojoHandle* new_handle) {
56 assert(g_system_impl_thunks.DuplicateHandleWithReducedRights);
57 return g_system_impl_thunks.DuplicateHandleWithReducedRights(
58 system, handle, rights_to_remove, new_handle);
59 }
60
61 MojoResult MojoSystemImplDuplicateHandle(MojoSystemImpl system,
62 MojoHandle handle,
63 MojoHandle* new_handle) {
64 assert(g_system_impl_thunks.DuplicateHandle);
65 return g_system_impl_thunks.DuplicateHandle(system, handle, new_handle);
66 }
67
51 MojoResult MojoSystemImplWait(MojoSystemImpl system, 68 MojoResult MojoSystemImplWait(MojoSystemImpl system,
52 MojoHandle handle, 69 MojoHandle handle,
53 MojoHandleSignals signals, 70 MojoHandleSignals signals,
54 MojoDeadline deadline, 71 MojoDeadline deadline,
55 struct MojoHandleSignalsState* signals_state) { 72 struct MojoHandleSignalsState* signals_state) {
56 assert(g_system_impl_thunks.Wait); 73 assert(g_system_impl_thunks.Wait);
57 return g_system_impl_thunks.Wait(system, handle, signals, deadline, 74 return g_system_impl_thunks.Wait(system, handle, signals, deadline,
58 signals_state); 75 signals_state);
59 } 76 }
60 77
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 g_system_impl_control_thunks = *system_thunks; 280 g_system_impl_control_thunks = *system_thunks;
264 return sizeof(g_system_impl_control_thunks); 281 return sizeof(g_system_impl_control_thunks);
265 } 282 }
266 283
267 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate( 284 THUNK_EXPORT size_t MojoSetSystemImplThunksPrivate(
268 const struct MojoSystemImplThunksPrivate* system_thunks) { 285 const struct MojoSystemImplThunksPrivate* system_thunks) {
269 if (system_thunks->size >= sizeof(g_system_impl_thunks)) 286 if (system_thunks->size >= sizeof(g_system_impl_thunks))
270 g_system_impl_thunks = *system_thunks; 287 g_system_impl_thunks = *system_thunks;
271 return sizeof(g_system_impl_thunks); 288 return sizeof(g_system_impl_thunks);
272 } 289 }
OLDNEW
« no previous file with comments | « mojo/public/platform/native/system_impl_private_thunks.h ('k') | mojo/public/platform/native/system_impl_private_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698