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

Side by Side Diff: chrome/browser/safe_browsing/download_protection_service.h

Issue 8536041: This CL integrates the new SafeBrowsing download service class (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix unit-tests Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Helper class which handles communication with the SafeBrowsing servers for 5 // Helper class which handles communication with the SafeBrowsing servers for
6 // improved binary download protection. 6 // improved binary download protection.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
10 #pragma once 10 #pragma once
(...skipping 27 matching lines...) Expand all
38 // tab URL redirect chain, ... 38 // tab URL redirect chain, ...
39 struct DownloadInfo { 39 struct DownloadInfo {
40 FilePath local_file; 40 FilePath local_file;
41 std::vector<GURL> download_url_chain; 41 std::vector<GURL> download_url_chain;
42 GURL referrer_url; 42 GURL referrer_url;
43 std::string sha256_hash; 43 std::string sha256_hash;
44 int64 total_bytes; 44 int64 total_bytes;
45 bool user_initiated; 45 bool user_initiated;
46 DownloadInfo(); 46 DownloadInfo();
47 ~DownloadInfo(); 47 ~DownloadInfo();
48 48 std::string DebugString() const;
49 // Creates a DownloadInfo from a DownloadItem object. 49 // Creates a DownloadInfo from a DownloadItem object.
50 static DownloadInfo FromDownloadItem(const DownloadItem& item); 50 static DownloadInfo FromDownloadItem(const DownloadItem& item);
51 }; 51 };
52 52
53 enum DownloadCheckResult { 53 enum DownloadCheckResult {
54 SAFE, 54 SAFE,
55 DANGEROUS, 55 DANGEROUS,
56 // In the future we may introduce a third category which corresponds to 56 // In the future we may introduce a third category which corresponds to
57 // suspicious downloads that are not known to be malicious. 57 // suspicious downloads that are not known to be malicious.
58 }; 58 };
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool enabled_; 155 bool enabled_;
156 156
157 // SignatureUtil object, may be overridden for testing. 157 // SignatureUtil object, may be overridden for testing.
158 scoped_refptr<SignatureUtil> signature_util_; 158 scoped_refptr<SignatureUtil> signature_util_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 160 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
161 }; 161 };
162 } // namespace safe_browsing 162 } // namespace safe_browsing
163 163
164 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 164 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698