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

Unified Diff: chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.cc

Issue 15624003: Validate image files before writing them to media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Override Created 7 years, 7 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/media_file_system_mount_point_provider.cc
diff --git a/chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.cc b/chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.cc
index faaeffd715fcf064654a32d4cb1f316150627a8d..6ebd723630fc7e60de2941368efc8c254b9a3913 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_system_mount_point_provider.cc
@@ -14,6 +14,7 @@
#include "base/sequenced_task_runner.h"
#include "chrome/browser/media_galleries/fileapi/device_media_async_file_util.h"
#include "chrome/browser/media_galleries/fileapi/itunes/itunes_file_util.h"
+#include "chrome/browser/media_galleries/fileapi/media_file_validator_factory.h"
#include "chrome/browser/media_galleries/fileapi/media_path_filter.h"
#include "chrome/browser/media_galleries/fileapi/native_media_file_util.h"
#include "chrome/browser/media_galleries/fileapi/picasa/picasa_file_util.h"
@@ -45,7 +46,8 @@ const char MediaFileSystemMountPointProvider::kMTPDeviceDelegateURLKey[] =
MediaFileSystemMountPointProvider::MediaFileSystemMountPointProvider(
const base::FilePath& profile_path)
: profile_path_(profile_path),
- media_path_filter_(new MediaPathFilter()),
+ media_path_filter_(new MediaPathFilter),
+ media_copy_or_move_file_validator_factory_(new MediaFileValidatorFactory),
native_media_file_util_(
new fileapi::AsyncFileUtilAdapter(new NativeMediaFileUtil())),
device_media_async_file_util_(
@@ -119,6 +121,7 @@ MediaFileSystemMountPointProvider::GetCopyOrMoveFileValidatorFactory(
switch (type) {
case fileapi::kFileSystemTypeNativeMedia:
case fileapi::kFileSystemTypeDeviceMedia:
+ case fileapi::kFileSystemTypeItunes:
if (!media_copy_or_move_file_validator_factory_) {
*error_code = base::PLATFORM_FILE_ERROR_SECURITY;
return NULL;
« no previous file with comments | « chrome/browser/media_galleries/OWNERS ('k') | chrome/browser/media_galleries/fileapi/media_file_validator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698