Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: chrome/browser/safe_browsing/services_delegate_impl.h

Issue 2561053002: V4Only: In V4Only mode use PVer4 for all SafeBrowsing operations (Closed)
Patch Set: Fix my comments from 2533993004 Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/browser/safe_browsing/client_side_detection_service.h" 11 #include "chrome/browser/safe_browsing/client_side_detection_service.h"
12 #include "chrome/browser/safe_browsing/download_protection_service.h" 12 #include "chrome/browser/safe_browsing/download_protection_service.h"
13 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser vice.h" 13 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser vice.h"
14 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec tor.h" 14 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec tor.h"
15 #include "chrome/browser/safe_browsing/services_delegate.h" 15 #include "chrome/browser/safe_browsing/services_delegate.h"
16 16
17 namespace safe_browsing { 17 namespace safe_browsing {
18 18
19 class V4LocalDatabaseManager; 19 class SafeBrowsingDatabaseManager;
20 20
21 // Actual ServicesDelegate implementation. Create via 21 // Actual ServicesDelegate implementation. Create via
22 // ServicesDelegate::Create(). 22 // ServicesDelegate::Create().
23 class ServicesDelegateImpl : public ServicesDelegate { 23 class ServicesDelegateImpl : public ServicesDelegate {
24 public: 24 public:
25 ServicesDelegateImpl(SafeBrowsingService* safe_browsing_service, 25 ServicesDelegateImpl(SafeBrowsingService* safe_browsing_service,
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<V4LocalDatabaseManager>& v4_local_database_manager() 31 const scoped_refptr<SafeBrowsingDatabaseManager>& v4_local_database_manager()
Scott Hess - ex-Googler 2016/12/08 06:02:55 Wait - you can even do this? I mean, of course yo
Nathan Parker 2016/12/08 23:00:58 Yea it works, but constrains it as you describe. I
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 void ShutdownServices() override; 36 void ShutdownServices() override;
37 void RefreshState(bool enable) override; 37 void RefreshState(bool enable) override;
38 void ProcessResourceRequest(const ResourceRequestInfo* request) override; 38 void ProcessResourceRequest(const ResourceRequestInfo* request) override;
39 std::unique_ptr<TrackedPreferenceValidationDelegate> 39 std::unique_ptr<TrackedPreferenceValidationDelegate>
40 CreatePreferenceValidationDelegate(Profile* profile) override; 40 CreatePreferenceValidationDelegate(Profile* profile) override;
41 void RegisterDelayedAnalysisCallback( 41 void RegisterDelayedAnalysisCallback(
(...skipping 16 matching lines...) Expand all
58 std::unique_ptr<ClientSideDetectionService> csd_service_; 58 std::unique_ptr<ClientSideDetectionService> csd_service_;
59 std::unique_ptr<DownloadProtectionService> download_service_; 59 std::unique_ptr<DownloadProtectionService> download_service_;
60 std::unique_ptr<IncidentReportingService> incident_service_; 60 std::unique_ptr<IncidentReportingService> incident_service_;
61 std::unique_ptr<ResourceRequestDetector> resource_request_detector_; 61 std::unique_ptr<ResourceRequestDetector> resource_request_detector_;
62 62
63 SafeBrowsingService* const safe_browsing_service_; 63 SafeBrowsingService* const safe_browsing_service_;
64 ServicesDelegate::ServicesCreator* const services_creator_; 64 ServicesDelegate::ServicesCreator* const services_creator_;
65 65
66 // The Pver4 local database manager handles the database and download logic 66 // The Pver4 local database manager handles the database and download logic
67 // Accessed on both UI and IO thread. 67 // Accessed on both UI and IO thread.
68 scoped_refptr<V4LocalDatabaseManager> v4_local_database_manager_; 68 scoped_refptr<SafeBrowsingDatabaseManager> v4_local_database_manager_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl); 70 DISALLOW_COPY_AND_ASSIGN(ServicesDelegateImpl);
71 }; 71 };
72 72
73 } // namespace safe_browsing 73 } // namespace safe_browsing
74 74
75 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_ 75 #endif // CHROME_BROWSER_SAFE_BROWSING_SERVICES_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698