Index: base/file_util.h |
diff --git a/base/file_util.h b/base/file_util.h |
index ed2f3ca737949d166929c27e690d822eb06763f5..3d3bfcb439971b3c6fe1cd9a93904c926184f2b9 100644 |
--- a/base/file_util.h |
+++ b/base/file_util.h |
@@ -78,6 +78,36 @@ BASE_EXPORT bool DeleteFile(const FilePath& path, bool recursive); |
// 1) The file/directory to be deleted should exist in a temp folder. |
// 2) The directory to be deleted must be empty. |
BASE_EXPORT bool DeleteFileAfterReboot(const FilePath& path); |
+ |
+// Invokes IAttachmentExecute::Save to validate the downloaded file. The call |
+// may scan the file for viruses and if necessary, annotate it with evidence. As |
+// a result of the validation, the file may be deleted. See: |
+// http://msdn.microsoft.com/en-us/bb776299 |
+// |
+// If Attachment Execution Services is unavailable, then this function will |
+// attempt to manually annotate the file with security zone information. A |
+// failure code will be returned in this case even if the file is sucessfully |
+// annotated. |
+// |
+// IAE::Save() will delete the file if it was found to be blocked by local |
+// security policy or if it was found to be infected. The call may also delete |
+// the file due to other failures (http://crbug.com/153212). A failure code will |
+// be returned in these cases. |
+// |
+// Typical return values: |
+// S_OK : The file was okay. If any viruses were found, they were cleaned. |
+// E_FAIL : Virus infected. |
+// INET_E_SECURITY_PROBLEM : The file was blocked due to security policy. |
+// |
+// Any other return value indicates an unexpected error during the scan. |
+// |
+// |full_path| : is the path to the downloaded file. This should be the final |
+// path of the download. |
+// |source_url|: the source URL for the download. If this is empty, |
+// the source will not be set. |
+BASE_EXPORT HRESULT ScanAndSaveDownloadedFile( |
+ const base::FilePath& full_path, |
+ const std::string& source_url); |
#endif |
Lei Zhang
2013/08/03 00:28:26
Since this has gotten a bit more separated from th
Greg Billock
2013/08/05 21:42:30
Done.
|
// Moves the given path, whether it's a file or a directory. |