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

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

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

Powered by Google App Engine
This is Rietveld 408576698