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

Unified Diff: webkit/browser/fileapi/copy_or_move_file_validator.h

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: Manage file_ref in calling code, remove from API. 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
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..75462b3a00869f865a208b07651e177c44149146 100644
--- a/webkit/browser/fileapi/copy_or_move_file_validator.h
+++ b/webkit/browser/fileapi/copy_or_move_file_validator.h
@@ -25,7 +25,19 @@ 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
kinuko 2013/07/12 05:00:19 This comment also needs to be updated?
Greg Billock 2013/07/12 18:02:19 Done.
+ // 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,
+ const ResultCallback& result_callback) = 0;
};
class CopyOrMoveFileValidatorFactory {

Powered by Google App Engine
This is Rietveld 408576698