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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 const DelayedAnalysisCallback& callback) override; | 44 const DelayedAnalysisCallback& callback) override; |
45 void AddDownloadManager(content::DownloadManager* download_manager) override; | 45 void AddDownloadManager(content::DownloadManager* download_manager) override; |
46 ClientSideDetectionService* GetCsdService() override; | 46 ClientSideDetectionService* GetCsdService() override; |
47 DownloadProtectionService* GetDownloadService() override; | 47 DownloadProtectionService* GetDownloadService() override; |
48 | 48 |
49 void StartOnIOThread( | 49 void StartOnIOThread( |
50 net::URLRequestContextGetter* url_request_context_getter, | 50 net::URLRequestContextGetter* url_request_context_getter, |
51 const V4ProtocolConfig& v4_config) override; | 51 const V4ProtocolConfig& v4_config) override; |
52 void StopOnIOThread(bool shutdown) override; | 52 void StopOnIOThread(bool shutdown) override; |
53 | 53 |
| 54 // Reports the current extended reporting level. Note that this is an |
| 55 // estimation and may not always be correct. It is possible that the |
| 56 // estimation finds both Scout and legacy extended reporting to be enabled. |
| 57 // This can happen, for instance, if one profile has Scout enabled and another |
| 58 // has legacy extended reporting enabled. In such a case, this method reports |
| 59 // LEGACY as the current level. |
| 60 ExtendedReportingLevel GetEstimatedExtendedReportingLevel() const; |
| 61 |
54 DownloadProtectionService* CreateDownloadProtectionService(); | 62 DownloadProtectionService* CreateDownloadProtectionService(); |
55 IncidentReportingService* CreateIncidentReportingService(); | 63 IncidentReportingService* CreateIncidentReportingService(); |
56 ResourceRequestDetector* CreateResourceRequestDetector(); | 64 ResourceRequestDetector* CreateResourceRequestDetector(); |
57 | 65 |
58 std::unique_ptr<ClientSideDetectionService> csd_service_; | 66 std::unique_ptr<ClientSideDetectionService> csd_service_; |
59 std::unique_ptr<DownloadProtectionService> download_service_; | 67 std::unique_ptr<DownloadProtectionService> download_service_; |
60 std::unique_ptr<IncidentReportingService> incident_service_; | 68 std::unique_ptr<IncidentReportingService> incident_service_; |
61 std::unique_ptr<ResourceRequestDetector> resource_request_detector_; | 69 std::unique_ptr<ResourceRequestDetector> resource_request_detector_; |
62 | 70 |
63 SafeBrowsingService* const safe_browsing_service_; | 71 SafeBrowsingService* const safe_browsing_service_; |
64 ServicesDelegate::ServicesCreator* const services_creator_; | 72 ServicesDelegate::ServicesCreator* const services_creator_; |
65 | 73 |
66 // The Pver4 local database manager handles the database and download logic | 74 // The Pver4 local database manager handles the database and download logic |
67 // Accessed on both UI and IO thread. | 75 // Accessed on both UI and IO thread. |
68 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_; | 76 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_; |
69 | 77 |
70 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl); | 78 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl); |
71 }; | 79 }; |
72 | 80 |
73 } // namespace safe_browsing | 81 } // namespace safe_browsing |
74 | 82 |
75 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ | 83 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ |
OLD | NEW |