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

Side by Side Diff: chromecast/common/media/shared_memory_chunk.cc

Issue 1553503002: Convert Pass()→std::move() in //chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 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 "chromecast/common/media/shared_memory_chunk.h" 5 #include "chromecast/common/media/shared_memory_chunk.h"
6 6
7 #include <utility>
8
7 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
8 10
9 namespace chromecast { 11 namespace chromecast {
10 namespace media { 12 namespace media {
11 13
12 SharedMemoryChunk::SharedMemoryChunk( 14 SharedMemoryChunk::SharedMemoryChunk(scoped_ptr<base::SharedMemory> shared_mem,
13 scoped_ptr<base::SharedMemory> shared_mem, 15 size_t size)
14 size_t size) 16 : shared_mem_(std::move(shared_mem)), size_(size) {}
15 : shared_mem_(shared_mem.Pass()),
16 size_(size) {
17 }
18 17
19 SharedMemoryChunk::~SharedMemoryChunk() { 18 SharedMemoryChunk::~SharedMemoryChunk() {
20 } 19 }
21 20
22 void* SharedMemoryChunk::data() const { 21 void* SharedMemoryChunk::data() const {
23 return shared_mem_->memory(); 22 return shared_mem_->memory();
24 } 23 }
25 24
26 size_t SharedMemoryChunk::size() const { 25 size_t SharedMemoryChunk::size() const {
27 return size_; 26 return size_;
28 } 27 }
29 28
30 bool SharedMemoryChunk::valid() const { 29 bool SharedMemoryChunk::valid() const {
31 return true; 30 return true;
32 } 31 }
33 32
34 } // namespace media 33 } // namespace media
35 } // namespace chromecast 34 } // namespace chromecast
36 35
OLDNEW
« no previous file with comments | « chromecast/browser/url_request_context_factory.cc ('k') | chromecast/crash/linux/crash_testing_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698