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

Issue 9836102: Fold WebDataSource into BufferedDataSource. (Closed)

Created:
8 years, 9 months ago by scherkus (not reviewing)
Modified:
8 years, 9 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fold WebDataSource into BufferedDataSource. With the removal of SimpleDataSource in r127309 we no longer require multiple implementations of WebDataSource. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=129192

Patch Set 1 #

Total comments: 6

Patch Set 2 : dcheck-o-rama #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -94 lines) Patch
M webkit/media/buffered_data_source.h View 1 3 chunks +29 lines, -9 lines 0 comments Download
M webkit/media/buffered_data_source.cc View 1 3 chunks +15 lines, -12 lines 0 comments Download
M webkit/media/buffered_data_source_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M webkit/media/buffered_resource_loader.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/media/buffered_resource_loader.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/media/buffered_resource_loader_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
D webkit/media/web_data_source.h View 1 chunk +0 lines, -48 lines 0 comments Download
D webkit/media/web_data_source.cc View 1 chunk +0 lines, -17 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M webkit/media/webmediaplayer_proxy.h View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
scherkus (not reviewing)
8 years, 9 months ago (2012-03-27 01:52:23 UTC) #1
Ami GONE FROM CHROMIUM
LGTM % nit (and a couple of q's that can be taken off reviewlog) https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_data_source.cc ...
8 years, 9 months ago (2012-03-27 05:16:19 UTC) #2
scherkus (not reviewing)
8 years, 9 months ago (2012-03-27 14:10:06 UTC) #3
https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_d...
File webkit/media/buffered_data_source.cc (right):

https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_d...
webkit/media/buffered_data_source.cc:113: return loader_.get() ?
loader_->HasSingleOrigin() : true;
On 2012/03/27 05:16:19, Ami Fischman wrote:
> (predates your CL, but)
> Is it right to default open like this, or should this be a DCHECK(loader_) to
> prevent being asked this question before Initialize() is called, and thus
before
> we can pass a judgement on the single-origin-ness of this object?
> (I worry about someone caching the answer and then Initializing with a
> not-single-origin URL/loader).

Good catch!

Technically we can get a false value even if loader_ exists (i.e., BRL hasn't
received an HTTP response yet so it returns default value).

DCHECK() added to make sure initialization has completed.

https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_d...
File webkit/media/buffered_data_source.h (right):

https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_d...
webkit/media/buffered_data_source.h:27: // in-memory sliding window.
On 2012/03/27 05:16:19, Ami Fischman wrote:
> doco ctor/dtor thread restrictions?  (I think this object must be created &
> destroyed on the render thread, but I'm not sure)

Done.

https://chromiumcodereview.appspot.com/9836102/diff/1/webkit/media/buffered_d...
webkit/media/buffered_data_source.h:28: class BufferedDataSource : public
media::DataSource {
On 2012/03/27 05:16:19, Ami Fischman wrote:
> How long till DataSource can become a pure interface?  (or die?)

set_host() is the only non-pure-virtual method and the interface also includes
ref-counting -- it'd be nice to get rid of both

the only other DataSource implementations are:
  * FileDataSource (tests, tools)
  * MockDataSource (tests)
  * DataSourceLogger (tools)

...so mostly test/tool support code, however DataSource is relatively low on the
list of code that needs to be nuked other than BDS/BRL itself.

Powered by Google App Engine
This is Rietveld 408576698