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

Side by Side Diff: mojo/edk/system/memory.h

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to mojo::edk namespace in preparation for runtim flag Created 5 years, 2 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 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 #ifndef MOJO_EDK_SYSTEM_MEMORY_H_ 5 #ifndef MOJO_EDK_SYSTEM_MEMORY_H_
6 #define MOJO_EDK_SYSTEM_MEMORY_H_ 6 #define MOJO_EDK_SYSTEM_MEMORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <string.h> // For |memcpy()|. 10 #include <string.h> // For |memcpy()|.
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "mojo/edk/system/system_impl_export.h" 13 #include "mojo/edk/system/system_impl_export.h"
14 #include "mojo/public/c/system/macros.h" 14 #include "mojo/public/c/system/macros.h"
15 #include "mojo/public/cpp/system/macros.h" 15 #include "mojo/public/cpp/system/macros.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace system { 18 namespace edk {
19 19
20 namespace internal { 20 namespace internal {
21 21
22 // Removes |const| from |T| (available as |remove_const<T>::type|): 22 // Removes |const| from |T| (available as |remove_const<T>::type|):
23 // TODO(vtl): Remove these once we have the C++11 |remove_const|. 23 // TODO(vtl): Remove these once we have the C++11 |remove_const|.
24 template <typename T> 24 template <typename T>
25 struct remove_const { 25 struct remove_const {
26 using type = T; 26 using type = T;
27 }; 27 };
28 template <typename T> 28 template <typename T>
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 private: 366 private:
367 UserPointer<Type> user_pointer_; 367 UserPointer<Type> user_pointer_;
368 size_t count_; 368 size_t count_;
369 scoped_ptr<Type[]> buffer_; 369 scoped_ptr<Type[]> buffer_;
370 370
371 MOJO_DISALLOW_COPY_AND_ASSIGN(UserPointerReaderWriter); 371 MOJO_DISALLOW_COPY_AND_ASSIGN(UserPointerReaderWriter);
372 }; 372 };
373 373
374 } // namespace system 374 } // namespace edk
375 } // namespace mojo 375 } // namespace mojo
376 376
377 #endif // MOJO_EDK_SYSTEM_MEMORY_H_ 377 #endif // MOJO_EDK_SYSTEM_MEMORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698