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

Unified Diff: chrome/browser/media_galleries/fileapi/native_media_file_util.h

Issue 16158004: iTunes file util and data provider for media galleries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo incorrect fix Created 7 years, 6 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
Index: chrome/browser/media_galleries/fileapi/native_media_file_util.h
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.h b/chrome/browser/media_galleries/fileapi/native_media_file_util.h
index 962adbb2c99a1af80cb75c7b528596c405a9d3f4..9d63efa1a575050810a7c6f2bed47f84a39c5202 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util.h
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.h
@@ -19,6 +19,11 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
NativeMediaFileUtil();
virtual ~NativeMediaFileUtil();
+ // Uses the MIME sniffer code, which actually looks into the file,
+ // to determine if it is really a media file (to avoid exposing
+ // non-media files with a media file extension.)
+ static base::PlatformFileError IsMediaFile(const base::FilePath& path);
+
// AsyncFileUtil overrides.
virtual bool CreateOrOpen(
fileapi::FileSystemOperationContext* context,
@@ -82,12 +87,41 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
const fileapi::FileSystemURL& url,
const CreateSnapshotFileCallback& callback) OVERRIDE;
- // Uses the MIME sniffer code, which actually looks into the file,
- // to determine if it is really a media file (to avoid exposing
- // non-media files with a media file extension.)
- static base::PlatformFileError IsMediaFile(const base::FilePath& path);
-
protected:
+ virtual void CreateDirectoryOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& url,
+ bool exclusive,
+ bool recursive,
+ const StatusCallback& callback);
+ virtual void GetFileInfoOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& url,
+ const GetFileInfoCallback& callback);
+ virtual void ReadDirectoryOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& url,
+ const ReadDirectoryCallback& callback);
+ virtual void CopyOrMoveFileLocalOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& src_url,
+ const fileapi::FileSystemURL& dest_url,
+ bool copy,
+ const StatusCallback& callback);
+ virtual void CopyInForeignFileOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const base::FilePath& src_file_path,
+ const fileapi::FileSystemURL& dest_url,
+ const StatusCallback& callback);
+ virtual void DeleteDirectoryOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& url,
+ const StatusCallback& callback);
+ virtual void CreateSnapshotFileOnTaskRunnerThread(
+ fileapi::FileSystemOperationContext* context,
+ const fileapi::FileSystemURL& url,
+ const CreateSnapshotFileCallback& callback);
+
// The following methods should only be called on the task runner thread.
// Necessary for copy/move to succeed.
@@ -152,39 +186,6 @@ class NativeMediaFileUtil : public fileapi::AsyncFileUtil {
base::PlatformFileError failure_error,
base::FilePath* local_file_path);
- virtual void CreateDirectoryOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
- bool exclusive,
- bool recursive,
- const StatusCallback& callback);
- virtual void GetFileInfoOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
- const GetFileInfoCallback& callback);
- virtual void ReadDirectoryOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
- const ReadDirectoryCallback& callback);
- virtual void CopyOrMoveFileLocalOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& src_url,
- const fileapi::FileSystemURL& dest_url,
- bool copy,
- const StatusCallback& callback);
- virtual void CopyInForeignFileOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const base::FilePath& src_file_path,
- const fileapi::FileSystemURL& dest_url,
- const StatusCallback& callback);
- virtual void DeleteDirectoryOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
- const StatusCallback& callback);
- virtual void CreateSnapshotFileOnTaskRunnerThread(
- fileapi::FileSystemOperationContext* context,
- const fileapi::FileSystemURL& url,
- const CreateSnapshotFileCallback& callback);
base::WeakPtrFactory<NativeMediaFileUtil> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698