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

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

Issue 2896893002: Minor revisions to incognito hit report code (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.h ('k') | components/safe_browsing/base_ui_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/ui_manager.cc
diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc
index 4c64c11ebb66378bb5a0289c3f5df387e000f01a..83f3da7fdd43a0534e49bc75b4744222e17f164d 100644
--- a/chrome/browser/safe_browsing/ui_manager.cc
+++ b/chrome/browser/safe_browsing/ui_manager.cc
@@ -103,22 +103,20 @@ void SafeBrowsingUIManager::ShowBlockingPageForResource(
SafeBrowsingBlockingPage::ShowBlockingPage(this, resource);
}
-// Static
-bool SafeBrowsingUIManager::ShouldSendHitReport(const HitReport& hit_report,
- WebContents* web_contents) {
- if (hit_report.extended_reporting_level != SBER_LEVEL_OFF &&
- !web_contents->GetBrowserContext()->IsOffTheRecord()) {
- return true;
- }
- return false;
+// static
+bool SafeBrowsingUIManager::ShouldSendHitReport(
+ const HitReport& hit_report,
+ const WebContents* web_contents) {
+ return hit_report.extended_reporting_level != SBER_LEVEL_OFF &&
+ !web_contents->GetBrowserContext()->IsOffTheRecord();
}
-// A safebrowsing hit is sent after a blocking page for malware/phishing
+// A SafeBrowsing hit is sent after a blocking page for malware/phishing
// or after the warning dialog for download urls, only for
// extended-reporting users.
void SafeBrowsingUIManager::MaybeReportSafeBrowsingHit(
const HitReport& hit_report,
- WebContents* web_contents) {
+ const WebContents* web_contents) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Send report if user opted-in to extended reporting and is not in
« no previous file with comments | « chrome/browser/safe_browsing/ui_manager.h ('k') | components/safe_browsing/base_ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698