Index: chrome/browser/safe_browsing/incident_reporting_service.h |
diff --git a/chrome/browser/safe_browsing/incident_reporting_service.h b/chrome/browser/safe_browsing/incident_reporting_service.h |
index bd024728cc21f67c66c27fa115f6478106a61f81..a05bc76baa74a700545cdec933e3bfe7dd98e9f3 100644 |
--- a/chrome/browser/safe_browsing/incident_reporting_service.h |
+++ b/chrome/browser/safe_browsing/incident_reporting_service.h |
@@ -19,6 +19,8 @@ |
#include "base/time/time.h" |
#include "base/timer/timer.h" |
#include "chrome/browser/safe_browsing/add_incident_callback.h" |
+#include "chrome/browser/safe_browsing/delayed_analysis_callback.h" |
+#include "chrome/browser/safe_browsing/delayed_callback_runner.h" |
#include "chrome/browser/safe_browsing/incident_report_uploader.h" |
#include "chrome/browser/safe_browsing/last_download_finder.h" |
#include "content/public/browser/notification_observer.h" |
@@ -83,6 +85,9 @@ class IncidentReportingService : public content::NotificationObserver { |
scoped_ptr<TrackedPreferenceValidationDelegate> |
CreatePreferenceValidationDelegate(Profile* profile); |
+ // Registers |callback| to be run after some delay following process launch. |
+ void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); |
+ |
protected: |
// A pointer to a function that populates a protobuf with environment data. |
typedef void (*CollectEnvironmentDataFn)( |
@@ -131,6 +136,9 @@ class IncidentReportingService : public content::NotificationObserver { |
// but not yet uploaded are dropped. |
void OnProfileDestroyed(Profile* profile); |
+ // Returns an initialized profile that participates in safe browsing. |
robertshield
2014/08/04 01:35:12
Mention that it returns the most opted-in profile
grt (UTC plus 2)
2014/08/04 14:15:33
Done.
|
+ 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. |
void AddIncident(Profile* profile, |
@@ -261,6 +269,9 @@ class IncidentReportingService : public content::NotificationObserver { |
// Context data for all on-the-record profiles. |
ProfileContextCollection profiles_; |
+ // Callbacks registered for performing delayed analysis. |
+ DelayedCallbackRunner delayed_analysis_callbacks_; |
+ |
// The collection of uploads in progress. |
ScopedVector<UploadContext> uploads_; |