OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SERVICES_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" | 11 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" |
12 #include "components/user_prefs/tracked/tracked_preference_validation_delegate.h
" | |
13 | 12 |
14 class Profile; | 13 class Profile; |
15 | 14 |
16 namespace content { | 15 namespace content { |
17 class DownloadManager; | 16 class DownloadManager; |
18 } | 17 } |
19 | 18 |
20 namespace net { | 19 namespace net { |
21 class URLRequestContextGetter; | 20 class URLRequestContextGetter; |
22 } | 21 } |
23 | 22 |
| 23 namespace prefs { |
| 24 namespace mojom { |
| 25 class TrackedPreferenceValidationDelegate; |
| 26 } |
| 27 } |
| 28 |
24 namespace safe_browsing { | 29 namespace safe_browsing { |
25 | 30 |
26 class ClientSideDetectionService; | 31 class ClientSideDetectionService; |
27 class DownloadProtectionService; | 32 class DownloadProtectionService; |
28 class IncidentReportingService; | 33 class IncidentReportingService; |
29 class ResourceRequestDetector; | 34 class ResourceRequestDetector; |
30 struct ResourceRequestInfo; | 35 struct ResourceRequestInfo; |
31 class SafeBrowsingService; | 36 class SafeBrowsingService; |
32 class SafeBrowsingDatabaseManager; | 37 class SafeBrowsingDatabaseManager; |
33 struct V4ProtocolConfig; | 38 struct V4ProtocolConfig; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 net::URLRequestContextGetter* context_getter) = 0; | 84 net::URLRequestContextGetter* context_getter) = 0; |
80 | 85 |
81 // Shuts down the download service. | 86 // Shuts down the download service. |
82 virtual void ShutdownServices() = 0; | 87 virtual void ShutdownServices() = 0; |
83 | 88 |
84 // Handles SafeBrowsingService::RefreshState() for the provided services. | 89 // Handles SafeBrowsingService::RefreshState() for the provided services. |
85 virtual void RefreshState(bool enable) = 0; | 90 virtual void RefreshState(bool enable) = 0; |
86 | 91 |
87 // See the SafeBrowsingService methods of the same name. | 92 // See the SafeBrowsingService methods of the same name. |
88 virtual void ProcessResourceRequest(const ResourceRequestInfo* request) = 0; | 93 virtual void ProcessResourceRequest(const ResourceRequestInfo* request) = 0; |
89 virtual std::unique_ptr<TrackedPreferenceValidationDelegate> | 94 virtual std::unique_ptr<prefs::mojom::TrackedPreferenceValidationDelegate> |
90 CreatePreferenceValidationDelegate(Profile* profile) = 0; | 95 CreatePreferenceValidationDelegate(Profile* profile) = 0; |
91 virtual void RegisterDelayedAnalysisCallback( | 96 virtual void RegisterDelayedAnalysisCallback( |
92 const DelayedAnalysisCallback& callback) = 0; | 97 const DelayedAnalysisCallback& callback) = 0; |
93 virtual void AddDownloadManager( | 98 virtual void AddDownloadManager( |
94 content::DownloadManager* download_manager) = 0; | 99 content::DownloadManager* download_manager) = 0; |
95 | 100 |
96 // Returns nullptr for any service that is not available. | 101 // Returns nullptr for any service that is not available. |
97 virtual ClientSideDetectionService* GetCsdService() = 0; | 102 virtual ClientSideDetectionService* GetCsdService() = 0; |
98 virtual DownloadProtectionService* GetDownloadService() = 0; | 103 virtual DownloadProtectionService* GetDownloadService() = 0; |
99 | 104 |
100 virtual void StartOnIOThread( | 105 virtual void StartOnIOThread( |
101 net::URLRequestContextGetter* url_request_context_getter, | 106 net::URLRequestContextGetter* url_request_context_getter, |
102 const V4ProtocolConfig& v4_config) = 0; | 107 const V4ProtocolConfig& v4_config) = 0; |
103 virtual void StopOnIOThread(bool shutdown) = 0; | 108 virtual void StopOnIOThread(bool shutdown) = 0; |
104 }; | 109 }; |
105 | 110 |
106 } // namespace safe_browsing | 111 } // namespace safe_browsing |
107 | 112 |
108 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ | 113 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
OLD | NEW |