diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h index c7fb95994..07345a96a 100644 --- a/webrtc/base/buffer.h +++ b/webrtc/base/buffer.h @@ -34,6 +34,10 @@ class Buffer { size_t size() const { return size_; } size_t capacity() const { return capacity_; } + // For backwards compatibility. TODO(kwiberg): Remove once Chromium doesn't + // need it anymore. + size_t length() const { return size(); } + Buffer& operator=(const Buffer& buf) { if (&buf != this) { Construct(buf.data(), buf.size(), buf.size());