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

Side by Side Diff: media/base/video_frame_metadata.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 7 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
« no previous file with comments | « media/base/video_frame_metadata.h ('k') | media/base/video_frame_pool_unittest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/base/video_frame_metadata.h" 5 #include "media/base/video_frame_metadata.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } // namespace 66 } // namespace
67 67
68 void VideoFrameMetadata::SetTimeDelta(Key key, const base::TimeDelta& value) { 68 void VideoFrameMetadata::SetTimeDelta(Key key, const base::TimeDelta& value) {
69 SetTimeValue(key, value, &dictionary_); 69 SetTimeValue(key, value, &dictionary_);
70 } 70 }
71 71
72 void VideoFrameMetadata::SetTimeTicks(Key key, const base::TimeTicks& value) { 72 void VideoFrameMetadata::SetTimeTicks(Key key, const base::TimeTicks& value) {
73 SetTimeValue(key, value, &dictionary_); 73 SetTimeValue(key, value, &dictionary_);
74 } 74 }
75 75
76 void VideoFrameMetadata::SetValue(Key key, scoped_ptr<base::Value> value) { 76 void VideoFrameMetadata::SetValue(Key key, std::unique_ptr<base::Value> value) {
77 dictionary_.SetWithoutPathExpansion(ToInternalKey(key), std::move(value)); 77 dictionary_.SetWithoutPathExpansion(ToInternalKey(key), std::move(value));
78 } 78 }
79 79
80 bool VideoFrameMetadata::GetBoolean(Key key, bool* value) const { 80 bool VideoFrameMetadata::GetBoolean(Key key, bool* value) const {
81 DCHECK(value); 81 DCHECK(value);
82 return dictionary_.GetBooleanWithoutPathExpansion(ToInternalKey(key), value); 82 return dictionary_.GetBooleanWithoutPathExpansion(ToInternalKey(key), value);
83 } 83 }
84 84
85 bool VideoFrameMetadata::GetInteger(Key key, int* value) const { 85 bool VideoFrameMetadata::GetInteger(Key key, int* value) const {
86 DCHECK(value); 86 DCHECK(value);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const base::Value* internal_value = nullptr; 154 const base::Value* internal_value = nullptr;
155 if (dictionary_.GetWithoutPathExpansion(ToInternalKey(key), 155 if (dictionary_.GetWithoutPathExpansion(ToInternalKey(key),
156 &internal_value) && 156 &internal_value) &&
157 internal_value->GetType() == base::Value::TYPE_BINARY) { 157 internal_value->GetType() == base::Value::TYPE_BINARY) {
158 return static_cast<const base::BinaryValue*>(internal_value); 158 return static_cast<const base::BinaryValue*>(internal_value);
159 } 159 }
160 return nullptr; 160 return nullptr;
161 } 161 }
162 162
163 } // namespace media 163 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_metadata.h ('k') | media/base/video_frame_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698