| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI
CE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI
CE_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI
CE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI
CE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/safe_browsing/download_protection_service.h" | 21 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 22 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" | 22 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" |
| 23 #include "chrome/browser/safe_browsing/incident_reporting/delayed_callback_runne
r.h" | 23 #include "chrome/browser/safe_browsing/incident_reporting/delayed_callback_runne
r.h" |
| 24 #include "chrome/browser/safe_browsing/incident_reporting/download_metadata_mana
ger.h" | 24 #include "chrome/browser/safe_browsing/incident_reporting/download_metadata_mana
ger.h" |
| 25 #include "chrome/browser/safe_browsing/incident_reporting/incident_report_upload
er.h" | 25 #include "chrome/browser/safe_browsing/incident_reporting/incident_report_upload
er.h" |
| 26 #include "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h
" | 26 #include "chrome/browser/safe_browsing/incident_reporting/last_download_finder.h
" |
| 27 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
| 28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
| 29 | 29 |
| 30 class Profile; | 30 class Profile; |
| 31 class TrackedPreferenceValidationDelegate; | |
| 32 | 31 |
| 33 namespace base { | 32 namespace base { |
| 34 class TaskRunner; | 33 class TaskRunner; |
| 35 } | 34 } |
| 36 | 35 |
| 37 namespace content { | 36 namespace content { |
| 38 class DownloadManager; | 37 class DownloadManager; |
| 39 class NotificationDetails; | 38 class NotificationDetails; |
| 40 class NotificationSource; | 39 class NotificationSource; |
| 41 } | 40 } |
| 42 | 41 |
| 43 namespace net { | 42 namespace net { |
| 44 class URLRequestContextGetter; | 43 class URLRequestContextGetter; |
| 45 } | 44 } |
| 46 | 45 |
| 46 namespace prefs { |
| 47 namespace mojom { |
| 48 class TrackedPreferenceValidationDelegate; |
| 49 } |
| 50 } |
| 51 |
| 47 namespace safe_browsing { | 52 namespace safe_browsing { |
| 48 | 53 |
| 49 #if !defined(GOOGLE_CHROME_BUILD) | 54 #if !defined(GOOGLE_CHROME_BUILD) |
| 50 extern const base::Feature kIncidentReportingDisableUpload; | 55 extern const base::Feature kIncidentReportingDisableUpload; |
| 51 #endif | 56 #endif |
| 52 | 57 |
| 53 class ClientDownloadRequest; | 58 class ClientDownloadRequest; |
| 54 class ClientIncidentReport; | 59 class ClientIncidentReport; |
| 55 class ClientIncidentReport_DownloadDetails; | 60 class ClientIncidentReport_DownloadDetails; |
| 56 class ClientIncidentReport_EnvironmentData; | 61 class ClientIncidentReport_EnvironmentData; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 87 | 92 |
| 88 // Returns an object by which external components can add an incident to the | 93 // Returns an object by which external components can add an incident to the |
| 89 // service. The object may outlive the service, but will no longer have any | 94 // service. The object may outlive the service, but will no longer have any |
| 90 // effect after the service is deleted. | 95 // effect after the service is deleted. |
| 91 std::unique_ptr<IncidentReceiver> GetIncidentReceiver(); | 96 std::unique_ptr<IncidentReceiver> GetIncidentReceiver(); |
| 92 | 97 |
| 93 // Returns a preference validation delegate that adds incidents to the service | 98 // Returns a preference validation delegate that adds incidents to the service |
| 94 // for validation failures in |profile|. The delegate may outlive the service, | 99 // for validation failures in |profile|. The delegate may outlive the service, |
| 95 // but incidents reported by it will no longer have any effect after the | 100 // but incidents reported by it will no longer have any effect after the |
| 96 // service is deleted. | 101 // service is deleted. |
| 97 std::unique_ptr<TrackedPreferenceValidationDelegate> | 102 std::unique_ptr<prefs::mojom::TrackedPreferenceValidationDelegate> |
| 98 CreatePreferenceValidationDelegate(Profile* profile); | 103 CreatePreferenceValidationDelegate(Profile* profile); |
| 99 | 104 |
| 100 // Registers |callback| to be run after some delay following process launch. | 105 // Registers |callback| to be run after some delay following process launch. |
| 101 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); | 106 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); |
| 102 | 107 |
| 103 // Adds |download_manager| to the set monitored for client download request | 108 // Adds |download_manager| to the set monitored for client download request |
| 104 // storage. | 109 // storage. |
| 105 void AddDownloadManager(content::DownloadManager* download_manager); | 110 void AddDownloadManager(content::DownloadManager* download_manager); |
| 106 | 111 |
| 107 protected: | 112 protected: |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // that are posted during normal processing (e.g., environment collection, | 352 // that are posted during normal processing (e.g., environment collection, |
| 348 // safe browsing database checks, and report uploads). | 353 // safe browsing database checks, and report uploads). |
| 349 base::WeakPtrFactory<IncidentReportingService> weak_ptr_factory_; | 354 base::WeakPtrFactory<IncidentReportingService> weak_ptr_factory_; |
| 350 | 355 |
| 351 DISALLOW_COPY_AND_ASSIGN(IncidentReportingService); | 356 DISALLOW_COPY_AND_ASSIGN(IncidentReportingService); |
| 352 }; | 357 }; |
| 353 | 358 |
| 354 } // namespace safe_browsing | 359 } // namespace safe_browsing |
| 355 | 360 |
| 356 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SE
RVICE_H_ | 361 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SE
RVICE_H_ |
| OLD | NEW |