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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 ServicesDelegate::ServicesCreator* services_creator); | 26 ServicesDelegate::ServicesCreator* services_creator); |
27 ~ServicesDelegateImpl() override; | 27 ~ServicesDelegateImpl() override; |
28 | 28 |
29 private: | 29 private: |
30 // ServicesDelegate: | 30 // ServicesDelegate: |
31 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager() | 31 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager() |
32 const override; | 32 const override; |
33 void Initialize() override; | 33 void Initialize() override; |
34 void InitializeCsdService( | 34 void InitializeCsdService( |
35 net::URLRequestContextGetter* context_getter) override; | 35 net::URLRequestContextGetter* context_getter) override; |
36 | |
Jialiu Lin
2017/01/25 02:03:29
nit: Is this extra empty line intentional?
vakh (use Gerrit instead)
2017/01/25 02:13:41
Nope. Removed.
| |
36 void ShutdownServices() override; | 37 void ShutdownServices() override; |
37 void RefreshState(bool enable) override; | 38 void RefreshState(bool enable) override; |
38 void ProcessResourceRequest(const ResourceRequestInfo* request) override; | 39 void ProcessResourceRequest(const ResourceRequestInfo* request) override; |
39 std::unique_ptr<TrackedPreferenceValidationDelegate> | 40 std::unique_ptr<TrackedPreferenceValidationDelegate> |
40 CreatePreferenceValidationDelegate(Profile* profile) override; | 41 CreatePreferenceValidationDelegate(Profile* profile) override; |
41 void RegisterDelayedAnalysisCallback( | 42 void RegisterDelayedAnalysisCallback( |
42 const DelayedAnalysisCallback& callback) override; | 43 const DelayedAnalysisCallback& callback) override; |
43 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( | 44 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( |
44 const DelayedAnalysisCallback& callback) override; | 45 const DelayedAnalysisCallback& callback) override; |
45 void AddDownloadManager(content::DownloadManager* download_manager) override; | 46 void AddDownloadManager(content::DownloadManager* download_manager) override; |
46 ClientSideDetectionService* GetCsdService() override; | 47 ClientSideDetectionService* GetCsdService() override; |
47 DownloadProtectionService* GetDownloadService() override; | 48 DownloadProtectionService* GetDownloadService() override; |
48 | 49 |
49 void StartOnIOThread( | 50 void StartOnIOThread( |
50 net::URLRequestContextGetter* url_request_context_getter, | 51 net::URLRequestContextGetter* url_request_context_getter, |
51 const V4ProtocolConfig& v4_config) override; | 52 const V4ProtocolConfig& v4_config) override; |
52 void StopOnIOThread(bool shutdown) override; | 53 void StopOnIOThread(bool shutdown) override; |
53 | 54 |
55 ExtendedReportingLevel GetMayBeExtendedReportingLevel() const; | |
Jialiu Lin
2017/01/25 02:03:29
nit: function name sounds a little bit funny. mayb
vakh (use Gerrit instead)
2017/01/25 02:13:41
Done.
| |
56 | |
54 DownloadProtectionService* CreateDownloadProtectionService(); | 57 DownloadProtectionService* CreateDownloadProtectionService(); |
55 IncidentReportingService* CreateIncidentReportingService(); | 58 IncidentReportingService* CreateIncidentReportingService(); |
56 ResourceRequestDetector* CreateResourceRequestDetector(); | 59 ResourceRequestDetector* CreateResourceRequestDetector(); |
57 | 60 |
58 std::unique_ptr<ClientSideDetectionService> csd_service_; | 61 std::unique_ptr<ClientSideDetectionService> csd_service_; |
59 std::unique_ptr<DownloadProtectionService> download_service_; | 62 std::unique_ptr<DownloadProtectionService> download_service_; |
60 std::unique_ptr<IncidentReportingService> incident_service_; | 63 std::unique_ptr<IncidentReportingService> incident_service_; |
61 std::unique_ptr<ResourceRequestDetector> resource_request_detector_; | 64 std::unique_ptr<ResourceRequestDetector> resource_request_detector_; |
62 | 65 |
63 SafeBrowsingService* const safe_browsing_service_; | 66 SafeBrowsingService* const safe_browsing_service_; |
64 ServicesDelegate::ServicesCreator* const services_creator_; | 67 ServicesDelegate::ServicesCreator* const services_creator_; |
65 | 68 |
66 // The Pver4 local database manager handles the database and download logic | 69 // The Pver4 local database manager handles the database and download logic |
67 // Accessed on both UI and IO thread. | 70 // Accessed on both UI and IO thread. |
68 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_; | 71 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_; |
69 | 72 |
70 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl); | 73 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl); |
71 }; | 74 }; |
72 | 75 |
73 } // namespace safe_browsing | 76 } // namespace safe_browsing |
74 | 77 |
75 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ | 78 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ |
OLD | NEW |