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

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

Issue 565053002: [Downloads] Gracefully handle SafeBrowsing check failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 // 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 10
(...skipping 23 matching lines...) Expand all
34 34
35 namespace safe_browsing { 35 namespace safe_browsing {
36 class DownloadFeedbackService; 36 class DownloadFeedbackService;
37 class BinaryFeatureExtractor; 37 class BinaryFeatureExtractor;
38 38
39 // This class provides an asynchronous API to check whether a particular 39 // This class provides an asynchronous API to check whether a particular
40 // client download is malicious or not. 40 // client download is malicious or not.
41 class DownloadProtectionService { 41 class DownloadProtectionService {
42 public: 42 public:
43 enum DownloadCheckResult { 43 enum DownloadCheckResult {
44 UNKNOWN,
44 SAFE, 45 SAFE,
45 DANGEROUS, 46 DANGEROUS,
46 UNCOMMON, 47 UNCOMMON,
47 DANGEROUS_HOST, 48 DANGEROUS_HOST,
48 POTENTIALLY_UNWANTED 49 POTENTIALLY_UNWANTED
49 }; 50 };
50 51
51 // Callback type which is invoked once the download request is done. 52 // Callback type which is invoked once the download request is done.
52 typedef base::Callback<void(DownloadCheckResult)> CheckDownloadCallback; 53 typedef base::Callback<void(DownloadCheckResult)> CheckDownloadCallback;
53 54
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 196
196 int64 download_request_timeout_ms_; 197 int64 download_request_timeout_ms_;
197 198
198 scoped_ptr<DownloadFeedbackService> feedback_service_; 199 scoped_ptr<DownloadFeedbackService> feedback_service_;
199 200
200 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); 201 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService);
201 }; 202 };
202 } // namespace safe_browsing 203 } // namespace safe_browsing
203 204
204 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ 205 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698