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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc

Issue 564833002: Fix needless environment scan in safe browsing incident reporting service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment tweak Created 6 years, 3 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 | « no previous file | chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
index 38845ec84ad80ed413c48f006610ebad0e64ebfa..955e8d4b5047c05454f3201fcaacd45ab18b4ae4 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -398,8 +398,10 @@ void IncidentReportingService::OnProfileAdded(Profile* profile) {
// Start a new report if this profile participates in safe browsing and there
// are process-wide incidents.
- if (safe_browsing_enabled && GetProfileContext(NULL))
+ if (safe_browsing_enabled && GetProfileContext(NULL) &&
+ GetProfileContext(NULL)->incidents.size()) {
BeginReportProcessing();
+ }
// TODO(grt): register for pref change notifications to start delayed analysis
// and/or report processing if sb is currently disabled but subsequently
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698