chromium/chrome/browser/apps/browser_instance/browser_app_instance_map.h

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

#ifndef CHROME_BROWSER_APPS_BROWSER_INSTANCE_BROWSER_APP_INSTANCE_MAP_H_
#define CHROME_BROWSER_APPS_BROWSER_INSTANCE_BROWSER_APP_INSTANCE_MAP_H_

#include <map>
#include <memory>
#include <set>
#include <utility>

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/ranges/algorithm.h"

namespace apps {

BrowserAppInstanceMap;

template <typename KeyT, typename ValueT>
ValueT& AddInstance(BrowserAppInstanceMap<KeyT, ValueT>& instances,
                    const KeyT& key,
                    std::unique_ptr<ValueT> instance) {}

template <typename KeyT, typename ValueT>
std::unique_ptr<ValueT> PopInstanceIfExists(
    BrowserAppInstanceMap<KeyT, ValueT>& instances,
    const KeyT& key) {}

template <typename KeyT, typename ValueT>
ValueT* GetInstance(const BrowserAppInstanceMap<KeyT, ValueT>& instances,
                    const KeyT& key) {}

template <typename KeyT, typename ValueT, typename PredicateT>
void SelectInstances(std::set<const ValueT*>& result,
                     const BrowserAppInstanceMap<KeyT, ValueT>& instances,
                     PredicateT predicate) {}

template <typename KeyT, typename ValueT, typename PredicateT>
const ValueT* FindInstanceIf(
    const BrowserAppInstanceMap<KeyT, ValueT>& instances,
    PredicateT predicate) {}

}  // namespace apps

#endif  // CHROME_BROWSER_APPS_BROWSER_INSTANCE_BROWSER_APP_INSTANCE_MAP_H_