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

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

Issue 18565002: [FileSystem] Add another copy-or-move validation hook for post-write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix flakey test Created 7 years, 5 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 | « no previous file | chrome/browser/media_galleries/fileapi/supported_image_type_validator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc
index 7afab9f983b219b207b3070ce54436e025302e43..862518670d338c289c43a6f35ad08ae15e31b35e 100644
--- a/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc
+++ b/chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/media_galleries/fileapi/supported_image_type_validator.h"
#include "webkit/browser/fileapi/copy_or_move_file_validator.h"
#include "webkit/browser/fileapi/file_system_url.h"
+#include "webkit/common/blob/shareable_file_reference.h"
namespace chrome {
@@ -17,7 +18,14 @@ namespace {
class InvalidFileValidator : public fileapi::CopyOrMoveFileValidator {
public:
virtual ~InvalidFileValidator() {}
- virtual void StartValidation(
+ virtual void StartPreWriteValidation(
+ const fileapi::CopyOrMoveFileValidator::ResultCallback&
+ result_callback) OVERRIDE {
+ result_callback.Run(base::PLATFORM_FILE_ERROR_SECURITY);
+ }
+
+ virtual void StartPostWriteValidation(
+ const base::FilePath& dest_platform_path,
const fileapi::CopyOrMoveFileValidator::ResultCallback&
result_callback) OVERRIDE {
result_callback.Run(base::PLATFORM_FILE_ERROR_SECURITY);
« no previous file with comments | « no previous file | chrome/browser/media_galleries/fileapi/supported_image_type_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698