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_STUB_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/safe_browsing/services_delegate.h" | 9 #include "chrome/browser/safe_browsing/services_delegate.h" |
10 | 10 |
11 namespace safe_browsing { | 11 namespace safe_browsing { |
12 | 12 |
13 class V4LocalDatabaseManager; | |
14 | |
15 // Dummy ServicesDelegate implementation. Create via ServicesDelegate::Create(). | 13 // Dummy ServicesDelegate implementation. Create via ServicesDelegate::Create(). |
16 class ServicesDelegateStub : public ServicesDelegate { | 14 class ServicesDelegateStub : public ServicesDelegate { |
17 public: | 15 public: |
18 ServicesDelegateStub(); | 16 ServicesDelegateStub(); |
19 ~ServicesDelegateStub() override; | 17 ~ServicesDelegateStub() override; |
20 | 18 |
21 private: | 19 private: |
22 // ServicesDelegate: | 20 // ServicesDelegate: |
23 const scoped_refptr<V4LocalDatabaseManager>& v4_local_database_manager() | 21 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager() |
24 const override; | 22 const override; |
25 void Initialize() override; | 23 void Initialize() override; |
26 void InitializeCsdService( | 24 void InitializeCsdService( |
27 net::URLRequestContextGetter* context_getter) override; | 25 net::URLRequestContextGetter* context_getter) override; |
28 void ShutdownServices() override; | 26 void ShutdownServices() override; |
29 void RefreshState(bool enable) override; | 27 void RefreshState(bool enable) override; |
30 void ProcessResourceRequest(const ResourceRequestInfo* request) override; | 28 void ProcessResourceRequest(const ResourceRequestInfo* request) override; |
31 std::unique_ptr<TrackedPreferenceValidationDelegate> | 29 std::unique_ptr<TrackedPreferenceValidationDelegate> |
32 CreatePreferenceValidationDelegate(Profile* profile) override; | 30 CreatePreferenceValidationDelegate(Profile* profile) override; |
33 void RegisterDelayedAnalysisCallback( | 31 void RegisterDelayedAnalysisCallback( |
34 const DelayedAnalysisCallback& callback) override; | 32 const DelayedAnalysisCallback& callback) override; |
35 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( | 33 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( |
36 const DelayedAnalysisCallback& callback) override; | 34 const DelayedAnalysisCallback& callback) override; |
37 void AddDownloadManager(content::DownloadManager* download_manager) override; | 35 void AddDownloadManager(content::DownloadManager* download_manager) override; |
38 ClientSideDetectionService* GetCsdService() override; | 36 ClientSideDetectionService* GetCsdService() override; |
39 DownloadProtectionService* GetDownloadService() override; | 37 DownloadProtectionService* GetDownloadService() override; |
40 | 38 |
41 void StartOnIOThread( | 39 void StartOnIOThread( |
42 net::URLRequestContextGetter* url_request_context_getter, | 40 net::URLRequestContextGetter* url_request_context_getter, |
43 const V4ProtocolConfig& v4_config) override; | 41 const V4ProtocolConfig& v4_config) override; |
44 void StopOnIOThread(bool shutdown) override; | 42 void StopOnIOThread(bool shutdown) override; |
45 | 43 |
46 scoped_refptr<V4LocalDatabaseManager> v4_local_database_manager_; | 44 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_; |
47 | 45 |
48 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateStub); | 46 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateStub); |
49 }; | 47 }; |
50 | 48 |
51 } // namespace safe_browsing | 49 } // namespace safe_browsing |
52 | 50 |
53 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ | 51 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ |
OLD | NEW |