Index: webkit/browser/fileapi/copy_or_move_file_validator.h |
diff --git a/webkit/browser/fileapi/copy_or_move_file_validator.h b/webkit/browser/fileapi/copy_or_move_file_validator.h |
index 9b32f5b8d3b101f81caae0d29038d76fb6ebd289..52cf0bf9b3445e749899d2cc75507ff6be311c65 100644 |
--- a/webkit/browser/fileapi/copy_or_move_file_validator.h |
+++ b/webkit/browser/fileapi/copy_or_move_file_validator.h |
@@ -13,6 +13,10 @@ namespace base { |
class FilePath; |
} |
+namespace webkit_blob { |
+class ShareableFileReference; |
+} |
+ |
namespace fileapi { |
class FileSystemURL; |
@@ -25,7 +29,20 @@ class WEBKIT_STORAGE_BROWSER_EXPORT CopyOrMoveFileValidator { |
virtual ~CopyOrMoveFileValidator() {} |
+ // Called on a source file before copying or moving to the final |
+ // destination. |
virtual void StartValidation(const ResultCallback& result_callback) = 0; |
+ |
+ // Called on a destination file after copying or moving to the final |
+ // destination. Suitable for running Anti-Virus checks. The |file_ref| is |
+ // a refcounted keepalive token for the destination file which may or |
+ // may not be present. Implementations should maintain the |file_ref| until |
vandebo (ex-Chrome)
2013/07/10 15:52:46
Hmm, can the caller manage the lifetime of the fil
Greg Billock
2013/07/11 22:54:35
There was a good spot you found to manage this. Re
|
+ // they finish and return in order to make sure the file is not prematurely |
+ // deleted from under them. |
+ virtual void StartPostWriteValidation( |
+ const base::FilePath& dest_platform_path, |
+ scoped_refptr<webkit_blob::ShareableFileReference> file_ref, |
+ const ResultCallback& result_callback) = 0; |
}; |
class CopyOrMoveFileValidatorFactory { |