OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and | 5 // The Safe Browsing service is responsible for downloading anti-phishing and |
6 // anti-malware tables and checking urls against them. | 6 // anti-malware tables and checking urls against them. |
7 | 7 |
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" | 26 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" |
27 #endif | 27 #endif |
28 | 28 |
29 class PrefChangeRegistrar; | 29 class PrefChangeRegistrar; |
30 class PrefService; | 30 class PrefService; |
31 class Profile; | 31 class Profile; |
32 struct SafeBrowsingProtocolConfig; | 32 struct SafeBrowsingProtocolConfig; |
33 class SafeBrowsingDatabaseManager; | 33 class SafeBrowsingDatabaseManager; |
34 class SafeBrowsingPingManager; | 34 class SafeBrowsingPingManager; |
35 class SafeBrowsingProtocolManager; | 35 class SafeBrowsingProtocolManager; |
| 36 class SafeBrowsingProtocolManagerDelegate; |
36 class SafeBrowsingServiceFactory; | 37 class SafeBrowsingServiceFactory; |
37 class SafeBrowsingUIManager; | 38 class SafeBrowsingUIManager; |
38 class SafeBrowsingURLRequestContextGetter; | 39 class SafeBrowsingURLRequestContextGetter; |
39 class TrackedPreferenceValidationDelegate; | 40 class TrackedPreferenceValidationDelegate; |
40 | 41 |
41 namespace base { | 42 namespace base { |
42 class Thread; | 43 class Thread; |
43 } | 44 } |
44 | 45 |
45 namespace content { | 46 namespace content { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 ~SafeBrowsingService() override; | 155 ~SafeBrowsingService() override; |
155 | 156 |
156 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager(); | 157 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager(); |
157 | 158 |
158 virtual SafeBrowsingUIManager* CreateUIManager(); | 159 virtual SafeBrowsingUIManager* CreateUIManager(); |
159 | 160 |
160 // Registers all the delayed analysis with the incident reporting service. | 161 // Registers all the delayed analysis with the incident reporting service. |
161 // This is where you register your process-wide, profile-independent analysis. | 162 // This is where you register your process-wide, profile-independent analysis. |
162 virtual void RegisterAllDelayedAnalysis(); | 163 virtual void RegisterAllDelayedAnalysis(); |
163 | 164 |
| 165 // Return a ptr to DatabaseManager's delegate, or NULL if it doesn't have one. |
| 166 virtual SafeBrowsingProtocolManagerDelegate* GetProtocolManagerDelegate(); |
| 167 |
164 private: | 168 private: |
165 friend class SafeBrowsingServiceFactoryImpl; | 169 friend class SafeBrowsingServiceFactoryImpl; |
166 friend struct content::BrowserThread::DeleteOnThread< | 170 friend struct content::BrowserThread::DeleteOnThread< |
167 content::BrowserThread::UI>; | 171 content::BrowserThread::UI>; |
168 friend class base::DeleteHelper<SafeBrowsingService>; | 172 friend class base::DeleteHelper<SafeBrowsingService>; |
169 friend class SafeBrowsingServerTest; | 173 friend class SafeBrowsingServerTest; |
170 friend class SafeBrowsingServiceTest; | 174 friend class SafeBrowsingServiceTest; |
171 friend class SafeBrowsingURLRequestContextGetter; | 175 friend class SafeBrowsingURLRequestContextGetter; |
172 | 176 |
173 void InitURLRequestContextOnIOThread( | 177 void InitURLRequestContextOnIOThread( |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 class SafeBrowsingServiceFactory { | 283 class SafeBrowsingServiceFactory { |
280 public: | 284 public: |
281 SafeBrowsingServiceFactory() { } | 285 SafeBrowsingServiceFactory() { } |
282 virtual ~SafeBrowsingServiceFactory() { } | 286 virtual ~SafeBrowsingServiceFactory() { } |
283 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 287 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
284 private: | 288 private: |
285 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 289 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
286 }; | 290 }; |
287 | 291 |
288 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 292 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |