OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_SAFE_UTIL_WIN_H_ | 5 #ifndef CONTENT_BROWSER_SAFE_UTIL_WIN_H_ |
6 #define CONTENT_BROWSER_SAFE_UTIL_WIN_H_ | 6 #define CONTENT_BROWSER_SAFE_UTIL_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class FilePath; | 14 class FilePath; |
15 } | 15 } |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 // Invokes IAttachmentExecute::Save to validate the downloaded file. The call | 19 // Invokes IAttachmentExecute::Save to validate the downloaded file. The call |
20 // may scan the file for viruses and if necessary, annotate it with evidence. As | 20 // may scan the file for viruses and if necessary, annotate it with evidence. As |
21 // a result of the validation, the file may be deleted. See: | 21 // a result of the validation, the file may be deleted. See: |
22 // http://msdn.microsoft.com/en-us/bb776299 | 22 // http://msdn.microsoft.com/en-us/bb776299 |
23 // | 23 // |
24 // If Attachment Execution Services is unavailable, then this function will | 24 // If Attachment Execution Services is unavailable, then this function will |
25 // attempt to manually annotate the file with security zone information. A | 25 // attempt to manually annotate the file with security zone information. A |
26 // failure code will be returned in this case even if the file is sucessfully | 26 // failure code will be returned in this case even if the file is successfully |
27 // annotated. | 27 // annotated. |
28 // | 28 // |
29 // IAE::Save() will delete the file if it was found to be blocked by local | 29 // IAE::Save() will delete the file if it was found to be blocked by local |
30 // security policy or if it was found to be infected. The call may also delete | 30 // security policy or if it was found to be infected. The call may also delete |
31 // the file due to other failures (http://crbug.com/153212). A failure code will | 31 // the file due to other failures (http://crbug.com/153212). A failure code will |
32 // be returned in these cases. | 32 // be returned in these cases. |
33 // | 33 // |
34 // Typical return values: | 34 // Typical return values: |
35 // S_OK : The file was okay. If any viruses were found, they were cleaned. | 35 // S_OK : The file was okay. If any viruses were found, they were cleaned. |
36 // E_FAIL : Virus infected. | 36 // E_FAIL : Virus infected. |
37 // INET_E_SECURITY_PROBLEM : The file was blocked due to security policy. | 37 // INET_E_SECURITY_PROBLEM : The file was blocked due to security policy. |
38 // | 38 // |
39 // Any other return value indicates an unexpected error during the scan. | 39 // Any other return value indicates an unexpected error during the scan. |
40 // | 40 // |
41 // |full_path| : is the path to the downloaded file. This should be the final | 41 // |full_path| : is the path to the downloaded file. This should be the final |
42 // path of the download. Must be present. | 42 // path of the download. Must be present. |
43 // |source_url|: the source URL for the download. If empty, the source will | 43 // |source_url|: the source URL for the download. If empty, the source will |
44 // not be set. | 44 // not be set. |
45 // |client_guid|: the GUID to be set in the IAttachmentExecute client slot. | 45 // |client_guid|: the GUID to be set in the IAttachmentExecute client slot. |
46 // Used to identify the app to the system AV function. | 46 // Used to identify the app to the system AV function. |
47 // If GUID_NULL is passed, no client GUID is set. | 47 // If GUID_NULL is passed, no client GUID is set. |
48 HRESULT AVScanFile(const base::FilePath& full_path, | 48 HRESULT AVScanFile(const base::FilePath& full_path, |
49 const std::string& source_url, | 49 const std::string& source_url, |
50 const GUID& client_guid); | 50 const GUID& client_guid); |
51 } // namespace content | 51 } // namespace content |
52 | 52 |
53 #endif // CONTENT_BROWSER_SAFE_UTIL_WIN_H_ | 53 #endif // CONTENT_BROWSER_SAFE_UTIL_WIN_H_ |
OLD | NEW |