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

Unified Diff: media/filters/file_data_source.h

Issue 149350: Added new gmock-based MockFilterHost and deprecated the old one. (Closed)
Patch Set: Remove anon namespace Created 11 years, 5 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/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/file_data_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « media/filters/ffmpeg_video_decoder_unittest.cc ('k') | media/filters/file_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698