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 // 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 REASON_ARCHIVE_WITHOUT_BINARIES, | 132 REASON_ARCHIVE_WITHOUT_BINARIES, |
133 REASON_DOWNLOAD_DANGEROUS_HOST, | 133 REASON_DOWNLOAD_DANGEROUS_HOST, |
134 REASON_DOWNLOAD_POTENTIALLY_UNWANTED, | 134 REASON_DOWNLOAD_POTENTIALLY_UNWANTED, |
135 REASON_MAX // Always add new values before this one. | 135 REASON_MAX // Always add new values before this one. |
136 }; | 136 }; |
137 | 137 |
138 private: | 138 private: |
139 class CheckClientDownloadRequest; // Per-request state | 139 class CheckClientDownloadRequest; // Per-request state |
140 friend class DownloadProtectionServiceTest; | 140 friend class DownloadProtectionServiceTest; |
141 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 141 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
| 142 CheckClientDownloadWhitelistedUrl); |
| 143 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
142 CheckClientDownloadValidateRequest); | 144 CheckClientDownloadValidateRequest); |
143 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 145 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
144 CheckClientDownloadSuccess); | 146 CheckClientDownloadSuccess); |
145 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 147 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
146 CheckClientDownloadHTTPS); | 148 CheckClientDownloadHTTPS); |
147 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 149 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
148 CheckClientDownloadZip); | 150 CheckClientDownloadZip); |
149 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 151 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
150 CheckClientDownloadFetchFailed); | 152 CheckClientDownloadFetchFailed); |
151 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, | 153 FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 195 |
194 int64 download_request_timeout_ms_; | 196 int64 download_request_timeout_ms_; |
195 | 197 |
196 scoped_ptr<DownloadFeedbackService> feedback_service_; | 198 scoped_ptr<DownloadFeedbackService> feedback_service_; |
197 | 199 |
198 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); | 200 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); |
199 }; | 201 }; |
200 } // namespace safe_browsing | 202 } // namespace safe_browsing |
201 | 203 |
202 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ | 204 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ |
OLD | NEW |