Remove deprecated ScopedMessageData::data().

Bug: None
Change-Id: I9dcb93db8c882eb90d2c0eadcb08bf9fb0753772
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227084
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34591}
This commit is contained in:
Mirko Bonadei 2021-07-28 09:02:25 +02:00 committed by WebRTC LUCI CQ
parent 61bd5d9c1c
commit e8e4d69c7f
2 changed files with 3 additions and 9 deletions

View File

@ -42,7 +42,7 @@ void DEPRECATED_AsyncInvoker::OnMessage(Message* msg) {
ScopedMessageData<AsyncClosure>* data =
static_cast<ScopedMessageData<AsyncClosure>*>(msg->pdata);
// Execute the closure and trigger the return message if needed.
data->inner_data().Execute();
data->data().Execute();
delete data;
}

View File

@ -46,15 +46,9 @@ class ScopedMessageData : public MessageData {
public:
explicit ScopedMessageData(std::unique_ptr<T> data)
: data_(std::move(data)) {}
// Deprecated.
// TODO(deadbeef): Returning a reference to a unique ptr? Why. Get rid of
// this once downstream applications stop using it, then rename inner_data to
// just data.
const std::unique_ptr<T>& data() const { return data_; }
std::unique_ptr<T>& data() { return data_; }
const T& inner_data() const { return *data_; }
T& inner_data() { return *data_; }
const T& data() const { return *data_; }
T& data() { return *data_; }
T* Release() { return data_.release(); }