#include "components/affiliations/core/browser/lookup_affiliation_response_parser.h"
#include "base/containers/flat_set.h"
namespace affiliations {
namespace {
template <typename MessageT>
std::vector<Facet> ParseFacets(const MessageT& response) { … }
AffiliatedFacets ParseEqClass(const affiliation_pb::Affiliation& affiliation) { … }
GroupedFacets ParseEqClass(const affiliation_pb::FacetGroup& grouping) { … }
void AddSingleFacet(std::vector<AffiliatedFacets>& affiliations, Facet facet) { … }
void AddSingleFacet(std::vector<GroupedFacets>& groups, Facet facet) { … }
template <typename MessageT, typename ResultT>
bool ParseResponse(const std::vector<FacetURI>& requested_facet_uris,
const MessageT& response,
ResultT& result) { … }
}
bool ParseLookupAffiliationResponse(
const std::vector<FacetURI>& requested_facet_uris,
const affiliation_pb::LookupAffiliationByHashPrefixResponse& response,
AffiliationFetcherDelegate::Result* result) { … }
}