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

Side by Side Diff: media/blink/resource_multibuffer.cc

Issue 1399603003: Tie multibuffers to URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_cache
Patch Set: added MEDIA_BLINK_EXPORT Created 5 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/blink/resource_multibuffer.h"
6
7 #include "media/blink/resource_multibuffer_data_provider.h"
8
9 namespace media {
10
11 const int kBlockSizeShift = 15; // 1<<15 == 32kb
12
13 ResourceMultiBuffer::ResourceMultiBuffer(blink::WebFrame* frame)
14 : MultiBuffer(kBlockSizeShift), frame_(frame) {}
15 ResourceMultiBuffer::~ResourceMultiBuffer() {}
16
17 MultiBuffer::DataProvider* ResourceMultiBuffer::CreateWriter(
18 const MultiBufferBlockId& pos) {
19 ResourceMultiBufferDataProvider* ret =
20 new ResourceMultiBufferDataProvider(pos, this);
21 ret->Start();
22 return ret;
23 }
24
25 void ResourceMultiBuffer::OnRedirect(const scoped_refptr<UrlData>& from,
26 const scoped_refptr<UrlData>& to) {
27 UpdateUrlData(from, to);
28 }
29
30 void ResourceMultiBuffer::Fail(const scoped_refptr<UrlData>& from) {
31 // Or possibly just register a failure in the urldata class?
32 UpdateUrlData(from, kUnknownUrlData);
33 }
34
35 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698