chromium/chrome/browser/profiles/profile_selections.h

// Copyright 2022 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_PROFILES_PROFILE_SELECTIONS_H_
#define CHROME_BROWSER_PROFILES_PROFILE_SELECTIONS_H_

#include <memory>

class Profile;

// A helper function that checks whether Keyed Services should be created for
// the given `profile` based on the default profile type value. Currently only
// returns true for a valid System Profile.
// This method is intended to be used only to bypass multiple factory/service
// checks.
bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile);

// The class `ProfileSelections` and enum `ProfileSelection` are not coupled
// with the usage of `ProfileKeyedServiceFactory` and can be used separately to
// filter out profiles based on their types.

// Enum used to map the logic of selecting the right profile based on the given
// profile.
enum class ProfileSelection {};

// Contains the logic for ProfileSelection for the different main Profile types
// (Regular, Guest and System). Each of these profile types also have Off the
// Record profiles equivalent, e.g. Incognito is Off the Record profile for
// Regular profile, the Guest user-visible profile is off-the-record, the
// Profile Picker uses the off-the-record System Profile.
// Maps Profile types to `ProfileSelection`.
//
// You can use predefined builders listed below for easier usages.
// If you need non trivial behavior (for Guest or System profiles for example),
// you should write your own expanded version of the builder.
class ProfileSelections {};

#endif  // CHROME_BROWSER_PROFILES_PROFILE_SELECTIONS_H_