Chromium Code Reviews| Index: chrome/browser/safe_browsing/ui_manager.h |
| diff --git a/chrome/browser/safe_browsing/ui_manager.h b/chrome/browser/safe_browsing/ui_manager.h |
| index 7ac91d41a3ccfc0140b901b76a627cfeaa0370eb..fd21294752bb56e10999d07bd04252b37bb05a8b 100644 |
| --- a/chrome/browser/safe_browsing/ui_manager.h |
| +++ b/chrome/browser/safe_browsing/ui_manager.h |
| @@ -70,9 +70,8 @@ class SafeBrowsingUIManager : public BaseUIManager { |
| // Report hits to the unsafe contents (malware, phishing, unsafe download URL) |
| // to the server. Can only be called on UI thread. If |post_data| is |
| // non-empty, the request will be sent as a POST instead of a GET. |
|
vakh (use Gerrit instead)
2017/05/19 22:41:13
I don't see the |post_data| argument to the functi
mortonm
2017/05/22 17:03:59
Done.
|
| - // Will report only for UMA || is_extended_reporting. |
| - void MaybeReportSafeBrowsingHit( |
| - const safe_browsing::HitReport& hit_report) override; |
| + void MaybeReportSafeBrowsingHit(const safe_browsing::HitReport& hit_report, |
| + content::WebContents* web_contents) override; |
| // Report permission action to SafeBrowsing servers. Can only be called on UI |
| // thread. |
| @@ -108,6 +107,11 @@ class SafeBrowsingUIManager : public BaseUIManager { |
| // Calls SafeBrowsingBlockingPage::ShowBlockingPage(). |
| void ShowBlockingPageForResource(const UnsafeResource& resource) override; |
| + // Helper method to ensure hit reports are only sent when the user has |
| + // opted in to extended reporting and is not currently in incognito mode. |
| + static bool ShouldSendHitReport(const HitReport& hit_report, |
| + content::WebContents* web_contents); |
| + |
| private: |
| friend class SafeBrowsingUIManagerTest; |
| friend class TestSafeBrowsingUIManager; |