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() | |
24 const override; | |
25 void Initialize() override; | 21 void Initialize() override; |
26 void InitializeCsdService( | 22 void InitializeCsdService( |
27 net::URLRequestContextGetter* context_getter) override; | 23 net::URLRequestContextGetter* context_getter) override; |
28 void ShutdownServices() override; | 24 void ShutdownServices() override; |
29 void RefreshState(bool enable) override; | 25 void RefreshState(bool enable) override; |
30 void ProcessResourceRequest(const ResourceRequestInfo* request) override; | 26 void ProcessResourceRequest(const ResourceRequestInfo* request) override; |
31 std::unique_ptr<TrackedPreferenceValidationDelegate> | 27 std::unique_ptr<TrackedPreferenceValidationDelegate> |
32 CreatePreferenceValidationDelegate(Profile* profile) override; | 28 CreatePreferenceValidationDelegate(Profile* profile) override; |
33 void RegisterDelayedAnalysisCallback( | 29 void RegisterDelayedAnalysisCallback( |
34 const DelayedAnalysisCallback& callback) override; | 30 const DelayedAnalysisCallback& callback) override; |
35 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( | 31 void RegisterExtendedReportingOnlyDelayedAnalysisCallback( |
36 const DelayedAnalysisCallback& callback) override; | 32 const DelayedAnalysisCallback& callback) override; |
37 void AddDownloadManager(content::DownloadManager* download_manager) override; | 33 void AddDownloadManager(content::DownloadManager* download_manager) override; |
38 ClientSideDetectionService* GetCsdService() override; | 34 ClientSideDetectionService* GetCsdService() override; |
39 DownloadProtectionService* GetDownloadService() override; | 35 DownloadProtectionService* GetDownloadService() override; |
40 | 36 |
41 void StartOnIOThread( | 37 void StartOnIOThread( |
42 net::URLRequestContextGetter* url_request_context_getter, | 38 net::URLRequestContextGetter* url_request_context_getter, |
43 const V4ProtocolConfig& v4_config) override; | 39 const V4ProtocolConfig& v4_config) override; |
44 void StopOnIOThread(bool shutdown) override; | 40 void StopOnIOThread(bool shutdown) override; |
45 | 41 |
46 scoped_refptr<V4LocalDatabaseManager> v4_local_database_manager_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateStub); | 42 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateStub); |
49 }; | 43 }; |
50 | 44 |
51 } // namespace safe_browsing | 45 } // namespace safe_browsing |
52 | 46 |
53 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ | 47 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_STUB_H_ |
OLD | NEW |