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

Unified Diff: media/blink/multibuffer.cc

Issue 1399603003: Tie multibuffers to URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_cache
Patch Set: compile fixes Created 5 years, 1 month 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
Index: media/blink/multibuffer.cc
diff --git a/media/blink/multibuffer.cc b/media/blink/multibuffer.cc
index 41c35825f53d179b8dab721f71a4dd7baa03b25a..7cd3bd2ee0bc744fa464f9b75b33d4937f57e604 100644
--- a/media/blink/multibuffer.cc
+++ b/media/blink/multibuffer.cc
@@ -162,8 +162,6 @@ void MultiBuffer::AddReader(const BlockId& pos, Reader* reader) {
if (!provider) {
DCHECK(writer_index_.find(pos) == writer_index_.end());
provider = writer_index_[pos] = CreateWriter(pos);
- provider->SetAvailableCallback(base::Bind(
- &MultiBuffer::DataProviderEvent, base::Unretained(this), provider));
}
provider->SetDeferred(false);
}
@@ -258,8 +256,13 @@ void MultiBuffer::ReleaseBlocks(const std::vector<MultiBufferBlockId>& blocks) {
}
}
}
+ if (data_.empty()) {
+ OnEmpty();
+ }
xhwang 2015/11/19 23:34:17 tiny nit: braces can be omitted here. I actually s
hubbe 2015/11/20 23:24:22 No, unfortunately I'm still all mixed up since I u
}
+void MultiBuffer::OnEmpty() {}
xhwang 2015/11/19 23:34:17 What's the purpose of this? Will some test class o
hubbe 2015/11/20 23:24:22 Comment added in multibuffer.h See ResourceMultiBu
+
void MultiBuffer::AddProvider(scoped_ptr<DataProvider> provider) {
// If there is already a provider in the same location, we delete it.
DCHECK(!provider->Available());

Powered by Google App Engine
This is Rietveld 408576698