fwupd_download_client.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2021 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 ASH_PUBLIC_CPP_FWUPD_DOWNLOAD_CLIENT_H_
  5. #define ASH_PUBLIC_CPP_FWUPD_DOWNLOAD_CLIENT_H_
  6. #include "ash/public/cpp/ash_public_export.h"
  7. #include "base/callback_forward.h"
  8. #include "base/memory/scoped_refptr.h"
  9. namespace network {
  10. class SharedURLLoaderFactory;
  11. } // namespace network
  12. namespace ash {
  13. // Interface for a class that provides profile-based download capabilities to
  14. // ash clients.
  15. // Fwupd is a firmware updater tool that lets users to update their peripheral's
  16. // firmware version.
  17. class ASH_PUBLIC_EXPORT FwupdDownloadClient {
  18. public:
  19. FwupdDownloadClient();
  20. FwupdDownloadClient(const FwupdDownloadClient&) = delete;
  21. FwupdDownloadClient& operator=(const FwupdDownloadClient&) = delete;
  22. static FwupdDownloadClient* Get();
  23. // Return the URL loader factory associated with the active user's profile.
  24. virtual scoped_refptr<network::SharedURLLoaderFactory>
  25. GetURLLoaderFactory() = 0;
  26. protected:
  27. virtual ~FwupdDownloadClient();
  28. };
  29. } // namespace ash
  30. #endif // ASH_PUBLIC_CPP_FWUPD_DOWNLOAD_CLIENT_H_