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

Side by Side Diff: content/browser/safe_util_win.h

Issue 21355004: [Downloads] Move client guid for AV scanning of downloaded files to chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add base class Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_COMMON_SAFE_UTIL_WIN_H_ 5 #ifndef CONTENT_COMMON_SAFE_UTIL_WIN_H_
6 #define CONTENT_COMMON_SAFE_UTIL_WIN_H_ 6 #define CONTENT_COMMON_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;
Lei Zhang 2013/08/03 00:28:26 remove
Greg Billock 2013/08/05 21:42:30 Done.
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 // Open or run a downloaded file via the Windows shell, possibly showing first 19 // Open or run a downloaded file via the Windows shell, possibly showing first
20 // a consent dialog if the the file is deemed dangerous. This function is an 20 // a consent dialog if the the file is deemed dangerous. This function is an
21 // enhancement over the OpenItemViaShell() function of win_util.h. 21 // enhancement over the OpenItemViaShell() function of win_util.h.
(...skipping 15 matching lines...) Expand all
37 // dialog will be shown telling the user that the file will be blocked. 37 // dialog will be shown telling the user that the file will be blocked.
38 // 38 //
39 // In the event that there is no default application registered for the file 39 // In the event that there is no default application registered for the file
40 // specified by 'full_path' it ask the user, via the Windows "Open With" 40 // specified by 'full_path' it ask the user, via the Windows "Open With"
41 // dialog. 41 // dialog.
42 // Returns 'true' on successful open, 'false' otherwise. 42 // Returns 'true' on successful open, 'false' otherwise.
43 bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title, 43 bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title,
44 const base::FilePath& full_path, 44 const base::FilePath& full_path,
45 const std::wstring& source_url); 45 const std::wstring& source_url);
46 46
47 // Invokes IAttachmentExecute::Save to validate the downloaded file. The call
48 // may scan the file for viruses and if necessary, annotate it with evidence. As
49 // a result of the validation, the file may be deleted. See:
50 // http://msdn.microsoft.com/en-us/bb776299
51 //
52 // If Attachment Execution Services is unavailable, then this function will
53 // attempt to manually annotate the file with security zone information. A
54 // failure code will be returned in this case even if the file is sucessfully
55 // annotated.
56 //
57 // IAE::Save() will delete the file if it was found to be blocked by local
58 // security policy or if it was found to be infected. The call may also delete
59 // the file due to other failures (http://crbug.com/153212). A failure code will
60 // be returned in these cases.
61 //
62 // Typical return values:
63 // S_OK : The file was okay. If any viruses were found, they were cleaned.
64 // E_FAIL : Virus infected.
65 // INET_E_SECURITY_PROBLEM : The file was blocked due to security policy.
66 //
67 // Any other return value indicates an unexpected error during the scan.
68 //
69 // |full_path| : is the path to the downloaded file. This should be the final
70 // path of the download.
71 // |source_url|: the source URL for the download.
72 HRESULT ScanAndSaveDownloadedFile(const base::FilePath& full_path,
73 const GURL& source_url);
74 } // namespace content 47 } // namespace content
75 48
76 #endif // CONTENT_COMMON_SAFE_UTIL_WIN_H_ 49 #endif // CONTENT_COMMON_SAFE_UTIL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698