#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 {
class StubIdleObserver : public user_education::FeaturePromoIdleObserver { … };
}
extern std::unique_ptr<user_education::FeaturePromoIdleObserver>
CreatePollingIdleObserver();
extern std::unique_ptr<RecentSessionObserver> CreateRecentSessionObserver(
Profile& profile);
UserEducationServiceFactory* UserEducationServiceFactory::GetInstance() { … }
UserEducationService* UserEducationServiceFactory::GetForBrowserContext(
content::BrowserContext* profile) { … }
UserEducationServiceFactory::UserEducationServiceFactory()
: … { … }
UserEducationServiceFactory::~UserEducationServiceFactory() = default;
std::unique_ptr<UserEducationService>
UserEducationServiceFactory::BuildServiceInstanceForBrowserContextImpl(
content::BrowserContext* context,
bool disable_idle_polling) { … }
bool UserEducationServiceFactory::ProfileAllowsUserEducation(Profile* profile) { … }
std::unique_ptr<KeyedService>
UserEducationServiceFactory::BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const { … }