chromium/chrome/browser/user_education/user_education_service_factory.cc

// 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.

#include "chrome/browser/user_education/user_education_service_factory.h"

#include <memory>
#include <optional>

#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "chrome/browser/headless/headless_mode_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
#include "chrome/browser/user_education/user_education_service.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/user_education/common/feature_promo_idle_observer.h"
#include "components/user_education/common/feature_promo_idle_policy.h"
#include "components/user_education/common/feature_promo_session_manager.h"
#include "content/public/browser/browser_context.h"

#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/components/mgs/managed_guest_session_utils.h"
#endif

namespace {

// Idle observer that doesn't do anything.
class StubIdleObserver : public user_education::FeaturePromoIdleObserver {};

}  // namespace

// These are found in chrome/browser/ui/user_education, so extern the factory
// methods to create the necessary objects.
extern std::unique_ptr<user_education::FeaturePromoIdleObserver>
CreatePollingIdleObserver();
extern std::unique_ptr<RecentSessionObserver> CreateRecentSessionObserver(
    Profile& profile);

UserEducationServiceFactory* UserEducationServiceFactory::GetInstance() {}

// static
UserEducationService* UserEducationServiceFactory::GetForBrowserContext(
    content::BrowserContext* profile) {}

UserEducationServiceFactory::UserEducationServiceFactory()
    :{}

UserEducationServiceFactory::~UserEducationServiceFactory() = default;

// static
std::unique_ptr<UserEducationService>
UserEducationServiceFactory::BuildServiceInstanceForBrowserContextImpl(
    content::BrowserContext* context,
    bool disable_idle_polling) {}

// static
bool UserEducationServiceFactory::ProfileAllowsUserEducation(Profile* profile) {}

std::unique_ptr<KeyedService>
UserEducationServiceFactory::BuildServiceInstanceForBrowserContext(
    content::BrowserContext* context) const {}