chromium/components/affiliations/core/browser/lookup_affiliation_response_parser.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/affiliations/core/browser/lookup_affiliation_response_parser.h"

#include "base/containers/flat_set.h"

namespace affiliations {

namespace {

// Template for the affiliation_pb message:
// > affiliation_pb::Affiliation
// > affiliation_pb::FacetGroup
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 for the affiliation_pb message:
// > affiliation_pb::Affiliation
// > affiliation_pb::FacetGroup
template <typename MessageT, typename ResultT>
bool ParseResponse(const std::vector<FacetURI>& requested_facet_uris,
                   const MessageT& response,
                   ResultT& result) {}

}  // namespace

bool ParseLookupAffiliationResponse(
    const std::vector<FacetURI>& requested_facet_uris,
    const affiliation_pb::LookupAffiliationByHashPrefixResponse& response,
    AffiliationFetcherDelegate::Result* result) {}

}  // namespace affiliations