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

Side by Side Diff: mojo/edk/embedder/simple_platform_support.cc

Issue 1529303004: Convert Pass()→std::move() in mojo/edk/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 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/edk/embedder/simple_platform_support.h" 5 #include "mojo/edk/embedder/simple_platform_support.h"
6 6
7 #include <utility>
8
7 #include "base/rand_util.h" 9 #include "base/rand_util.h"
8 #include "mojo/edk/embedder/simple_platform_shared_buffer.h" 10 #include "mojo/edk/embedder/simple_platform_shared_buffer.h"
9 11
10 namespace mojo { 12 namespace mojo {
11 namespace edk { 13 namespace edk {
12 14
13 void SimplePlatformSupport::GetCryptoRandomBytes(void* bytes, 15 void SimplePlatformSupport::GetCryptoRandomBytes(void* bytes,
14 size_t num_bytes) { 16 size_t num_bytes) {
15 base::RandBytes(bytes, num_bytes); 17 base::RandBytes(bytes, num_bytes);
16 } 18 }
17 19
18 PlatformSharedBuffer* SimplePlatformSupport::CreateSharedBuffer( 20 PlatformSharedBuffer* SimplePlatformSupport::CreateSharedBuffer(
19 size_t num_bytes) { 21 size_t num_bytes) {
20 return SimplePlatformSharedBuffer::Create(num_bytes); 22 return SimplePlatformSharedBuffer::Create(num_bytes);
21 } 23 }
22 24
23 PlatformSharedBuffer* SimplePlatformSupport::CreateSharedBufferFromHandle( 25 PlatformSharedBuffer* SimplePlatformSupport::CreateSharedBufferFromHandle(
24 size_t num_bytes, 26 size_t num_bytes,
25 ScopedPlatformHandle platform_handle) { 27 ScopedPlatformHandle platform_handle) {
26 return SimplePlatformSharedBuffer::CreateFromPlatformHandle( 28 return SimplePlatformSharedBuffer::CreateFromPlatformHandle(
27 num_bytes, platform_handle.Pass()); 29 num_bytes, std::move(platform_handle));
28 } 30 }
29 31
30 } // namespace edk 32 } // namespace edk
31 } // namespace mojo 33 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/embedder/simple_platform_shared_buffer_unittest.cc ('k') | mojo/edk/js/tests/js_to_cpp_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698