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

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

Issue 891793002: Take a Profile when adding an incident to the incident reporting service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and formatting Created 5 years, 11 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/incident_reporting/incident_reporting_service.h
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h
index 1fac481b235621ffb0d58638d0bbe122f543729f..5a2d25dd7e22ce09b7904a41268d196ab8c87131 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h
@@ -78,16 +78,14 @@ class IncidentReportingService : public content::NotificationObserver {
~IncidentReportingService() override;
// Returns a callback by which external components can add an incident to the
- // service on behalf of |profile|. The callback may outlive the service, but
- // will no longer have any effect after the service is deleted. The callback
- // must not be run after |profile| has been destroyed.
- AddIncidentCallback GetAddIncidentCallback(Profile* profile);
+ // service. The callback may outlive the service, but will no longer have any
+ // effect after the service is deleted.
+ AddIncidentCallback GetAddIncidentCallback();
// Returns a preference validation delegate that adds incidents to the service
// for validation failures in |profile|. The delegate may outlive the service,
// but incidents reported by it will no longer have any effect after the
- // service is deleted. The lifetime of the delegate should not extend beyond
- // that of the profile it services.
+ // service is deleted.
scoped_ptr<TrackedPreferenceValidationDelegate>
CreatePreferenceValidationDelegate(Profile* profile);
@@ -161,8 +159,7 @@ class IncidentReportingService : public content::NotificationObserver {
// participating in extended safe browsing are preferred.
Profile* FindEligibleProfile() const;
- // Adds |incident_data| to the service. The incident_time_msec field is
- // populated with the current time if the caller has not already done so.
+ // Adds |incident_data| relating to the optional |profile| to the service.
void AddIncident(Profile* profile, scoped_ptr<Incident> incident);
// Begins processing a report. If processing is already underway, ensures that

Powered by Google App Engine
This is Rietveld 408576698