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: mojo/system/entrypoints.cc

Issue 425523002: Mojo: Convert MemoryTest.Valid to the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/memory.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/entrypoints.h" 5 #include "mojo/system/entrypoints.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/functions.h" 9 #include "mojo/public/c/system/functions.h"
10 #include "mojo/public/c/system/message_pipe.h" 10 #include "mojo/public/c/system/message_pipe.h"
11 #include "mojo/system/core.h" 11 #include "mojo/system/core.h"
12 12
13 static mojo::system::Core* g_core = NULL; 13 static mojo::system::Core* g_core = NULL;
14 14
15 using mojo::system::MakeUserPointer; 15 using mojo::system::MakeUserPointer;
16 using mojo::system::MakeUserPointerValue;
17 16
18 namespace mojo { 17 namespace mojo {
19 namespace system { 18 namespace system {
20 namespace entrypoints { 19 namespace entrypoints {
21 20
22 void SetCore(Core* core) { 21 void SetCore(Core* core) {
23 g_core = core; 22 g_core = core;
24 } 23 }
25 24
26 Core* GetCore() { 25 Core* GetCore() {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 void** buffer, 175 void** buffer,
177 MojoMapBufferFlags flags) { 176 MojoMapBufferFlags flags) {
178 return g_core->MapBuffer(buffer_handle, 177 return g_core->MapBuffer(buffer_handle,
179 offset, 178 offset,
180 num_bytes, 179 num_bytes,
181 MakeUserPointer(buffer), 180 MakeUserPointer(buffer),
182 flags); 181 flags);
183 } 182 }
184 183
185 MojoResult MojoUnmapBuffer(void* buffer) { 184 MojoResult MojoUnmapBuffer(void* buffer) {
186 return g_core->UnmapBuffer(MakeUserPointerValue(buffer)); 185 return g_core->UnmapBuffer(MakeUserPointer(buffer));
187 } 186 }
188 187
189 } // extern "C" 188 } // extern "C"
OLDNEW
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698