OLD | NEW |
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 |
11 | 11 |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/callback.h" | 17 #include "base/callback.h" |
18 #include "base/file_path.h" | 18 #include "base/file_path.h" |
19 #include "base/gtest_prod_util.h" | 19 #include "base/gtest_prod_util.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 | 22 |
23 namespace net { | |
24 class URLRequestContextGetter; | |
25 class URLRequestStatus; | |
26 } // namespace net | |
27 class DownloadItem; | 23 class DownloadItem; |
28 class SafeBrowsingService; | 24 class SafeBrowsingService; |
29 | 25 |
| 26 namespace net { |
| 27 class URLRequestContextGetter; |
| 28 } // namespace net |
| 29 |
30 namespace safe_browsing { | 30 namespace safe_browsing { |
31 class SignatureUtil; | 31 class SignatureUtil; |
32 | 32 |
33 // This class provides an asynchronous API to check whether a particular | 33 // This class provides an asynchronous API to check whether a particular |
34 // client download is malicious or not. | 34 // client download is malicious or not. |
35 class DownloadProtectionService { | 35 class DownloadProtectionService { |
36 public: | 36 public: |
37 // TODO(noelutz): we're missing some fields here: server IPs, | 37 // TODO(noelutz): we're missing some fields here: server IPs, |
38 // tab URL redirect chain, ... | 38 // tab URL redirect chain, ... |
39 struct DownloadInfo { | 39 struct DownloadInfo { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_ |
OLD | NEW |