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

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

Issue 15624003: Validate image files before writing them to media galleries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and rebase 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_validator_factory.h
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..083e00b2388380f9ef747c70915aa9b39ef205f2
--- /dev/null
+++ b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.h
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_VALIDATOR_FACTORY_H_
+#define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_VALIDATOR_FACTORY_H_
+
+#include "base/basictypes.h"
+#include "base/files/file_path.h"
Lei Zhang 2013/05/25 00:09:01 forward decl
vandebo (ex-Chrome) 2013/05/29 06:09:15 Done.
+#include "webkit/browser/fileapi/copy_or_move_file_validator.h"
+
+namespace fileapi {
+class FileSystemURL;
+}
+
+namespace chrome {
+
+// A factory for media file validators. A media file validator will use various
+// strategies (depending on the file type) to attempt to verify that the file
+// is a valid media file.
+class MediaFileValidatorFactory
+ : public fileapi::CopyOrMoveFileValidatorFactory {
+ public:
+ MediaFileValidatorFactory();
+ virtual ~MediaFileValidatorFactory();
+
+ // CopyOrMoveFileValidatorFactory implementation.
+ virtual fileapi::CopyOrMoveFileValidator* CreateCopyOrMoveFileValidator(
+ const fileapi::FileSystemURL& src,
+ const base::FilePath& platform_path) OVERRIDE;
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MediaFileValidatorFactory);
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_VALIDATOR_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698