Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3173)

Unified Diff: chrome/browser/safe_browsing/ui_manager.h

Issue 2886043002: Refrain from sending hit report when user is in incognito mode (Closed)
Patch Set: ready for review Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..2c79777ea95ea13de099ae2b08af0bc6ef53d42f 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -71,8 +71,13 @@ class SafeBrowsingUIManager : public BaseUIManager {
// 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.
// Will report only for UMA || is_extended_reporting.
Jialiu Lin 2017/05/18 22:32:12 You can remove the last line of this comments, sin
mortonm 2017/05/19 20:21:03 Done.
- void MaybeReportSafeBrowsingHit(
- const safe_browsing::HitReport& hit_report) override;
+ void MaybeReportSafeBrowsingHit(const safe_browsing::HitReport& hit_report,
+ content::WebContents* web_contents) 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,
Jialiu Lin 2017/05/18 22:32:12 How about moving this to protected session?
mortonm 2017/05/19 20:21:03 Done.
+ content::WebContents* web_contents);
// Report permission action to SafeBrowsing servers. Can only be called on UI
// thread.

Powered by Google App Engine
This is Rietveld 408576698