| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // Returns true iff the download specified by |info| should be scanned by | 108 // Returns true iff the download specified by |info| should be scanned by |
| 109 // CheckClientDownload() for malicious content. | 109 // CheckClientDownload() for malicious content. |
| 110 virtual bool IsSupportedDownload( | 110 virtual bool IsSupportedDownload( |
| 111 const content::DownloadItem& item, | 111 const content::DownloadItem& item, |
| 112 const base::FilePath& target_path) const; | 112 const base::FilePath& target_path) const; |
| 113 | 113 |
| 114 virtual void CheckPPAPIDownloadRequest( | 114 virtual void CheckPPAPIDownloadRequest( |
| 115 const GURL& requestor_url, | 115 const GURL& requestor_url, |
| 116 const base::FilePath& default_file_path, | 116 const base::FilePath& default_file_path, |
| 117 const std::vector<base::FilePath::StringType>& alternate_extensions, | 117 const std::vector<base::FilePath::StringType>& alternate_extensions, |
| 118 bool is_extended_reporting, |
| 119 bool is_incognito, |
| 118 const CheckDownloadCallback& callback); | 120 const CheckDownloadCallback& callback); |
| 119 | 121 |
| 120 // Display more information to the user regarding the download specified by | 122 // Display more information to the user regarding the download specified by |
| 121 // |info|. This method is invoked when the user requests more information | 123 // |info|. This method is invoked when the user requests more information |
| 122 // about a download that was marked as malicious. | 124 // about a download that was marked as malicious. |
| 123 void ShowDetailsForDownload(const content::DownloadItem& item, | 125 void ShowDetailsForDownload(const content::DownloadItem& item, |
| 124 content::PageNavigator* navigator); | 126 content::PageNavigator* navigator); |
| 125 | 127 |
| 126 // Enables or disables the service. This is usually called by the | 128 // Enables or disables the service. This is usually called by the |
| 127 // SafeBrowsingService, which tracks whether any profile uses these services | 129 // SafeBrowsingService, which tracks whether any profile uses these services |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 std::set<std::string> manual_blacklist_hashes_; | 302 std::set<std::string> manual_blacklist_hashes_; |
| 301 | 303 |
| 302 // Rate of whitelisted downloads we sample to send out download ping. | 304 // Rate of whitelisted downloads we sample to send out download ping. |
| 303 double whitelist_sample_rate_; | 305 double whitelist_sample_rate_; |
| 304 | 306 |
| 305 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); | 307 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); |
| 306 }; | 308 }; |
| 307 } // namespace safe_browsing | 309 } // namespace safe_browsing |
| 308 | 310 |
| 309 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ | 311 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ |
| OLD | NEW |