| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // result. | 301 // result. |
| 302 std::unique_ptr<ReferrerChain> IdentifyReferrerChain( | 302 std::unique_ptr<ReferrerChain> IdentifyReferrerChain( |
| 303 const GURL& download_url, | 303 const GURL& download_url, |
| 304 content::WebContents* web_contents); | 304 content::WebContents* web_contents); |
| 305 | 305 |
| 306 // If kDownloadAttribution feature is enabled, identify referrer chain of the | 306 // If kDownloadAttribution feature is enabled, identify referrer chain of the |
| 307 // PPAPI download based on the frame URL where the download is initiated. | 307 // PPAPI download based on the frame URL where the download is initiated. |
| 308 // Then add referrer chain info to ClientDownloadRequest proto. This function | 308 // Then add referrer chain info to ClientDownloadRequest proto. This function |
| 309 // also records UMA stats of download attribution result. | 309 // also records UMA stats of download attribution result. |
| 310 void AddReferrerChainToPPAPIClientDownloadRequest( | 310 void AddReferrerChainToPPAPIClientDownloadRequest( |
| 311 const GURL& initiating_frame_url, | 311 const GURL& initiating_frame_url, |
| 312 int tab_id, | 312 const GURL& initiating_main_frame_url, |
| 313 bool has_user_gesture, | 313 int tab_id, |
| 314 ClientDownloadRequest* out_request); | 314 bool has_user_gesture, |
| 315 ClientDownloadRequest* out_request); |
| 315 | 316 |
| 316 // These pointers may be NULL if SafeBrowsing is disabled. | 317 // These pointers may be NULL if SafeBrowsing is disabled. |
| 317 scoped_refptr<SafeBrowsingUIManager> ui_manager_; | 318 scoped_refptr<SafeBrowsingUIManager> ui_manager_; |
| 318 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; | 319 scoped_refptr<SafeBrowsingDatabaseManager> database_manager_; |
| 319 scoped_refptr<SafeBrowsingNavigationObserverManager> | 320 scoped_refptr<SafeBrowsingNavigationObserverManager> |
| 320 navigation_observer_manager_; | 321 navigation_observer_manager_; |
| 321 | 322 |
| 322 // The context we use to issue network requests. | 323 // The context we use to issue network requests. |
| 323 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 324 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 324 | 325 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 354 std::set<std::string> manual_blacklist_hashes_; | 355 std::set<std::string> manual_blacklist_hashes_; |
| 355 | 356 |
| 356 // Rate of whitelisted downloads we sample to send out download ping. | 357 // Rate of whitelisted downloads we sample to send out download ping. |
| 357 double whitelist_sample_rate_; | 358 double whitelist_sample_rate_; |
| 358 | 359 |
| 359 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); | 360 DISALLOW_COPY_AND_ASSIGN(DownloadProtectionService); |
| 360 }; | 361 }; |
| 361 } // namespace safe_browsing | 362 } // namespace safe_browsing |
| 362 | 363 |
| 363 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ | 364 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_SERVICE_H_ |
| OLD | NEW |