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

Unified Diff: media/base/video_frame_metadata.cc

Issue 2841623003: Remove base::Value::Get{Buffer,Size} (Closed)
Patch Set: std::vector::assign instead of std::vector::operator= Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | mojo/common/values_struct_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_metadata.cc
diff --git a/media/base/video_frame_metadata.cc b/media/base/video_frame_metadata.cc
index 292274e5add1a746fd1953507c2d85ded05b2dd9..5b65cd2f24fdad536db4d8cf143e93be3fcbf7cb 100644
--- a/media/base/video_frame_metadata.cc
+++ b/media/base/video_frame_metadata.cc
@@ -111,7 +111,8 @@ bool VideoFrameMetadata::GetString(Key key, std::string* value) const {
DCHECK(value);
const base::Value* const binary_value = GetBinaryValue(key);
if (binary_value)
- value->assign(binary_value->GetBuffer(), binary_value->GetSize());
+ value->assign(binary_value->GetBlob().data(),
+ binary_value->GetBlob().size());
return !!binary_value;
}
@@ -120,9 +121,10 @@ template <class TimeType>
bool ToTimeValue(const base::Value& binary_value, TimeType* value) {
DCHECK(value);
int64_t internal_value;
- if (binary_value.GetSize() != sizeof(internal_value))
+ if (binary_value.GetBlob().size() != sizeof(internal_value))
return false;
- memcpy(&internal_value, binary_value.GetBuffer(), sizeof(internal_value));
+ memcpy(&internal_value, binary_value.GetBlob().data(),
+ sizeof(internal_value));
*value = TimeType::FromInternalValue(internal_value);
return true;
}
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | mojo/common/values_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698