weblayer_client_side_detection_service_delegate.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef WEBLAYER_BROWSER_SAFE_BROWSING_WEBLAYER_CLIENT_SIDE_DETECTION_SERVICE_DELEGATE_H_
  5. #define WEBLAYER_BROWSER_SAFE_BROWSING_WEBLAYER_CLIENT_SIDE_DETECTION_SERVICE_DELEGATE_H_
  6. #include "base/memory/raw_ptr.h"
  7. #include "components/safe_browsing/content/browser/client_side_detection_service.h"
  8. #include "weblayer/browser/browser_context_impl.h"
  9. namespace weblayer {
  10. class WebLayerClientSideDetectionServiceDelegate
  11. : public safe_browsing::ClientSideDetectionService::Delegate {
  12. public:
  13. explicit WebLayerClientSideDetectionServiceDelegate(
  14. BrowserContextImpl* browser_context);
  15. WebLayerClientSideDetectionServiceDelegate(
  16. const WebLayerClientSideDetectionServiceDelegate&) = delete;
  17. WebLayerClientSideDetectionServiceDelegate& operator=(
  18. const WebLayerClientSideDetectionServiceDelegate&) = delete;
  19. ~WebLayerClientSideDetectionServiceDelegate() override;
  20. // ClientSideDetectionService::Delegate implementation.
  21. PrefService* GetPrefs() override;
  22. scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
  23. scoped_refptr<network::SharedURLLoaderFactory>
  24. GetSafeBrowsingURLLoaderFactory() override;
  25. safe_browsing::ChromeUserPopulation GetUserPopulation() override;
  26. private:
  27. raw_ptr<BrowserContextImpl> browser_context_;
  28. };
  29. } // namespace weblayer
  30. #endif // WEBLAYER_BROWSER_SAFE_BROWSING_WEBLAYER_CLIENT_SIDE_DETECTION_SERVICE_DELEGATE_H_