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

Unified Diff: media/base/data_buffer.cc

Issue 17315021: Refactored DataBuffer to use unix_hacker style methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inlined getters and setters on DataBuffer Created 7 years, 6 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 | « media/base/data_buffer.h ('k') | media/base/data_buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/data_buffer.cc
diff --git a/media/base/data_buffer.cc b/media/base/data_buffer.cc
index 9bd67d592883c958209ba9723e54348a21d88052..d0b40eed1a530146ec5f3350318ba15abfba1783 100644
--- a/media/base/data_buffer.cc
+++ b/media/base/data_buffer.cc
@@ -49,50 +49,4 @@ scoped_refptr<DataBuffer> DataBuffer::CopyFrom(const uint8* data, int size) {
scoped_refptr<DataBuffer> DataBuffer::CreateEOSBuffer() {
return make_scoped_refptr(new DataBuffer(NULL, 0));
}
-
-base::TimeDelta DataBuffer::GetTimestamp() const {
- DCHECK(!IsEndOfStream());
- return timestamp_;
-}
-
-void DataBuffer::SetTimestamp(const base::TimeDelta& timestamp) {
- DCHECK(!IsEndOfStream());
- timestamp_ = timestamp;
-}
-
-base::TimeDelta DataBuffer::GetDuration() const {
- DCHECK(!IsEndOfStream());
- return duration_;
-}
-
-void DataBuffer::SetDuration(const base::TimeDelta& duration) {
- DCHECK(!IsEndOfStream());
- duration_ = duration;
-}
-
-bool DataBuffer::IsEndOfStream() const {
- return data_ == NULL;
-}
-
-const uint8* DataBuffer::GetData() const {
- DCHECK(!IsEndOfStream());
- return data_.get();
-}
-
-uint8* DataBuffer::GetWritableData() {
- DCHECK(!IsEndOfStream());
- return data_.get();
-}
-
-int DataBuffer::GetDataSize() const {
- DCHECK(!IsEndOfStream());
- return data_size_;
-}
-
-void DataBuffer::SetDataSize(int data_size) {
- DCHECK(!IsEndOfStream());
- CHECK_LE(data_size, buffer_size_);
- data_size_ = data_size;
-}
-
} // namespace media
« no previous file with comments | « media/base/data_buffer.h ('k') | media/base/data_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698