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_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static std::unique_ptr<ServicesDelegate> CreateForTest( | 65 static std::unique_ptr<ServicesDelegate> CreateForTest( |
66 SafeBrowsingService* safe_browsing_service, | 66 SafeBrowsingService* safe_browsing_service, |
67 ServicesDelegate::ServicesCreator* services_creator); | 67 ServicesDelegate::ServicesCreator* services_creator); |
68 | 68 |
69 virtual ~ServicesDelegate() {} | 69 virtual ~ServicesDelegate() {} |
70 | 70 |
71 virtual const scoped_refptr<SafeBrowsingDatabaseManager>& | 71 virtual const scoped_refptr<SafeBrowsingDatabaseManager>& |
72 v4_local_database_manager() const = 0; | 72 v4_local_database_manager() const = 0; |
73 | 73 |
74 // Initializes internal state using the ServicesCreator. | 74 // Initializes internal state using the ServicesCreator. |
75 virtual void Initialize() = 0; | 75 virtual void Initialize(bool v4_enabled = false) = 0; |
76 | 76 |
77 // Creates the CSD service for the given |context_getter|. | 77 // Creates the CSD service for the given |context_getter|. |
78 virtual void InitializeCsdService( | 78 virtual void InitializeCsdService( |
79 net::URLRequestContextGetter* context_getter) = 0; | 79 net::URLRequestContextGetter* context_getter) = 0; |
80 | 80 |
81 // Shuts down the download service. | 81 // Shuts down the download service. |
82 virtual void ShutdownServices() = 0; | 82 virtual void ShutdownServices() = 0; |
83 | 83 |
84 // Handles SafeBrowsingService::RefreshState() for the provided services. | 84 // Handles SafeBrowsingService::RefreshState() for the provided services. |
85 virtual void RefreshState(bool enable) = 0; | 85 virtual void RefreshState(bool enable) = 0; |
(...skipping 15 matching lines...) Expand all Loading... |
101 | 101 |
102 virtual void StartOnIOThread( | 102 virtual void StartOnIOThread( |
103 net::URLRequestContextGetter* url_request_context_getter, | 103 net::URLRequestContextGetter* url_request_context_getter, |
104 const V4ProtocolConfig& v4_config) = 0; | 104 const V4ProtocolConfig& v4_config) = 0; |
105 virtual void StopOnIOThread(bool shutdown) = 0; | 105 virtual void StopOnIOThread(bool shutdown) = 0; |
106 }; | 106 }; |
107 | 107 |
108 } // namespace safe_browsing | 108 } // namespace safe_browsing |
109 | 109 |
110 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ | 110 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_H_ |
OLD | NEW |