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

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

Issue 251723004: No media-file validation mode for DeviceMediaAsyncUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review #2 Created 6 years, 8 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/device_media_async_file_util.h
diff --git a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h
index d7afcd1cefc28dbcbb7ee2aa6a778e1ff5a5fd01..83f58daa14b7df64da43524bb1278de2978cad8b 100644
--- a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h
+++ b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h
@@ -30,6 +30,11 @@ namespace webkit_blob {
class FileStreamReader;
}
+enum MediaFileValidationType {
+ NO_MEDIA_FILE_VALIDATION,
+ APPLY_MEDIA_FILE_VALIDATION,
+};
+
class DeviceMediaAsyncFileUtil : public fileapi::AsyncFileUtil {
public:
virtual ~DeviceMediaAsyncFileUtil();
@@ -37,7 +42,9 @@ class DeviceMediaAsyncFileUtil : public fileapi::AsyncFileUtil {
// Returns an instance of DeviceMediaAsyncFileUtil. Returns NULL if
// asynchronous operation is not supported. Callers own the returned
// object.
- static DeviceMediaAsyncFileUtil* Create(const base::FilePath& profile_path);
+ static DeviceMediaAsyncFileUtil* Create(
+ const base::FilePath& profile_path,
+ MediaFileValidationType validation_type);
bool SupportsStreaming(const fileapi::FileSystemURL& url);
@@ -124,7 +131,8 @@ class DeviceMediaAsyncFileUtil : public fileapi::AsyncFileUtil {
private:
// Use Create() to get an instance of DeviceMediaAsyncFileUtil.
- explicit DeviceMediaAsyncFileUtil(const base::FilePath& profile_path);
+ DeviceMediaAsyncFileUtil(const base::FilePath& profile_path,
+ MediaFileValidationType validation_type);
// Called when GetFileInfo method call succeeds. |file_info| contains the
// file details of the requested url. |callback| is invoked to complete the
@@ -201,6 +209,8 @@ class DeviceMediaAsyncFileUtil : public fileapi::AsyncFileUtil {
// Profile path.
const base::FilePath profile_path_;
+ const MediaFileValidationType validation_type_;
+
// For callbacks that may run after destruction.
base::WeakPtrFactory<DeviceMediaAsyncFileUtil> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698