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

Unified Diff: media/blink/multibuffer.cc

Issue 1904253002: Convert //media/blink from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « media/blink/multibuffer.h ('k') | media/blink/multibuffer_data_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/multibuffer.cc
diff --git a/media/blink/multibuffer.cc b/media/blink/multibuffer.cc
index e489087f41fe95528700b3e187358e385426d2bb..6705afc4edfc264084f8537a1578c3e555c530be 100644
--- a/media/blink/multibuffer.cc
+++ b/media/blink/multibuffer.cc
@@ -299,20 +299,20 @@ void MultiBuffer::ReleaseBlocks(const std::vector<MultiBufferBlockId>& blocks) {
void MultiBuffer::OnEmpty() {}
-void MultiBuffer::AddProvider(scoped_ptr<DataProvider> provider) {
+void MultiBuffer::AddProvider(std::unique_ptr<DataProvider> provider) {
// If there is already a provider in the same location, we delete it.
DCHECK(!provider->Available());
BlockId pos = provider->Tell();
writer_index_[pos] = std::move(provider);
}
-scoped_ptr<MultiBuffer::DataProvider> MultiBuffer::RemoveProvider(
+std::unique_ptr<MultiBuffer::DataProvider> MultiBuffer::RemoveProvider(
DataProvider* provider) {
BlockId pos = provider->Tell();
auto iter = writer_index_.find(pos);
DCHECK(iter != writer_index_.end());
DCHECK_EQ(iter->second.get(), provider);
- scoped_ptr<DataProvider> ret = std::move(iter->second);
+ std::unique_ptr<DataProvider> ret = std::move(iter->second);
writer_index_.erase(iter);
return ret;
}
@@ -363,7 +363,7 @@ void MultiBuffer::Prune(size_t max_to_free) {
}
void MultiBuffer::OnDataProviderEvent(DataProvider* provider_tmp) {
- scoped_ptr<DataProvider> provider(RemoveProvider(provider_tmp));
+ std::unique_ptr<DataProvider> provider(RemoveProvider(provider_tmp));
BlockId start_pos = provider->Tell();
BlockId pos = start_pos;
bool eof = false;
« no previous file with comments | « media/blink/multibuffer.h ('k') | media/blink/multibuffer_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698