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

Unified Diff: media/filters/file_data_source.cc

Issue 20572004: Add media file validation to utility process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final nits Created 7 years, 4 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/file_data_source.h ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/file_data_source.cc
diff --git a/media/filters/file_data_source.cc b/media/filters/file_data_source.cc
index 2f34718a47f684975e4ff192884d822ae1b9f2ac..341347e78a1be64c420ca73fcef77f2ed9103ceb 100644
--- a/media/filters/file_data_source.cc
+++ b/media/filters/file_data_source.cc
@@ -25,6 +25,17 @@ bool FileDataSource::Initialize(const base::FilePath& file_path) {
return true;
}
+bool FileDataSource::InitializeFromPlatformFile(
+ const base::PlatformFile& file) {
+ DCHECK(!file_.IsValid());
+
+ if (!file_.Initialize(file))
+ return false;
+
+ UpdateHostBytes();
+ return true;
+}
+
void FileDataSource::set_host(DataSourceHost* host) {
DataSource::set_host(host);
UpdateHostBytes();
« no previous file with comments | « media/filters/file_data_source.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698