| Index: media/filters/file_data_source.h
|
| diff --git a/media/filters/file_data_source.h b/media/filters/file_data_source.h
|
| index e93c662db61e61cded63a05667175c521160d21e..e58e4aa588482d57cddd2a51e75bb2879175b558 100644
|
| --- a/media/filters/file_data_source.h
|
| +++ b/media/filters/file_data_source.h
|
| @@ -9,14 +9,12 @@
|
|
|
| #include "base/lock.h"
|
| #include "media/base/filters.h"
|
| +#include "testing/gtest/include/gtest/gtest_prod.h"
|
|
|
| namespace media {
|
|
|
| // Basic data source that treats the URL as a file path, and uses the file
|
| // system to read data for a media pipeline.
|
| -// TODO(ralph): We will add a pure virtual interface so that the chrome
|
| -// media player delegate can give us the file handle, bytes downloaded so far,
|
| -// and file size.
|
| class FileDataSource : public DataSource {
|
| public:
|
| // Public method to get a filter factory for the FileDataSource.
|
| @@ -37,11 +35,17 @@ class FileDataSource : public DataSource {
|
| virtual bool IsSeekable();
|
|
|
| private:
|
| + // Only allow factories and tests to create this object.
|
| + //
|
| + // TODO(scherkus): I'm getting tired of these factories getting in the way
|
| + // of my tests!!!
|
| + FRIEND_TEST(FileDataSourceTest, OpenFile);
|
| + FRIEND_TEST(FileDataSourceTest, ReadData);
|
| friend class FilterFactoryImpl0<FileDataSource>;
|
| FileDataSource();
|
| virtual ~FileDataSource();
|
|
|
| - // File handle. Null if not initialized or an error occurs.
|
| + // File handle. NULL if not initialized or an error occurs.
|
| FILE* file_;
|
|
|
| // Size of the file in bytes.
|
| @@ -53,7 +57,7 @@ class FileDataSource : public DataSource {
|
| // Critical section that protects all of the DataSource methods to prevent
|
| // a Stop from happening while in the middle of a file I/O operation.
|
| // TODO(ralphl): Ideally this would use asynchronous I/O or we will know
|
| - // that we will block for a short period of time in reads. Othewise, we can
|
| + // that we will block for a short period of time in reads. Otherwise, we can
|
| // hang the pipeline Stop.
|
| Lock lock_;
|
|
|
|
|