Chromium Code Reviews| Index: base/file_util.h |
| diff --git a/base/file_util.h b/base/file_util.h |
| index 9673a6111fead5450e04ce2a60ae78f11a7b8ce4..402cb9d16fe2bfd5d599a20bcce091648df645e9 100644 |
| --- a/base/file_util.h |
| +++ b/base/file_util.h |
| @@ -78,7 +78,39 @@ 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); |
| -#endif |
| + |
| +// 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. |
| +// |client_guid|: the GUID to be set in the IAttachmentExecute client slot. |
| +// If GUID.Empty is passed, no client GUID is set. |
|
asanka
2013/08/07 16:42:36
GUID_NULL. Or as suggested elsewhere, take a const
Greg Billock
2013/08/07 17:42:56
Done.
|
| +BASE_EXPORT HRESULT AVScanFile(const FilePath& full_path, |
| + const std::string& source_url, |
| + const GUID& client_guid); |
| +#endif // defined(OS_WIN) |
| // Moves the given path, whether it's a file or a directory. |
| // If a simple rename is not possible, such as in the case where the paths are |