component_updater_utils.h 950 B

12345678910111213141516171819202122232425262728
  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 COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_
  5. #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_
  6. #include <string>
  7. #include <vector>
  8. #include "base/containers/flat_map.h"
  9. #include "third_party/abseil-cpp/absl/types/optional.h"
  10. namespace component_updater {
  11. struct ComponentRegistration;
  12. absl::optional<ComponentRegistration> GetComponent(
  13. const base::flat_map<std::string, ComponentRegistration>& components,
  14. const std::string& id);
  15. std::vector<absl::optional<ComponentRegistration>> GetCrxComponents(
  16. const base::flat_map<std::string, ComponentRegistration>&
  17. registered_components,
  18. const std::vector<std::string>& ids);
  19. } // namespace component_updater
  20. #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_