1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_
11 #include "base/containers/flat_map.h"
12 #include "third_party/abseil-cpp/absl/types/optional.h"
14 namespace component_updater {
15 struct ComponentRegistration;
17 absl::optional<ComponentRegistration> GetComponent(
18 const base::flat_map<std::string, ComponentRegistration>& components,
19 const std::string& id);
21 std::vector<absl::optional<ComponentRegistration>> GetCrxComponents(
22 const base::flat_map<std::string, ComponentRegistration>&
23 registered_components,
24 const std::vector<std::string>& ids);
26 } // namespace component_updater
28 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_UTILS_H_