#ifndef CHROME_BROWSER_GLIC_PUBLIC_GLIC_KEYED_SERVICE_FACTORY_H_
#define CHROME_BROWSER_GLIC_PUBLIC_GLIC_KEYED_SERVICE_FACTORY_H_
#include <memory>
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace base {
template <typename T>
class NoDestructor;
}
namespace content {
class BrowserContext;
}
namespace glic {
class GlicKeyedService;
class GlicKeyedServiceFactory : public BrowserContextKeyedServiceFactory {
public:
static GlicKeyedServiceFactory* GetInstance();
static GlicKeyedService* GetGlicKeyedService(
content::BrowserContext* browser_context,
bool create = false);
GlicKeyedServiceFactory(const GlicKeyedServiceFactory&) = delete;
GlicKeyedServiceFactory& operator=(const GlicKeyedServiceFactory&) = delete;
bool ServiceIsCreatedWithBrowserContext() const override;
std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const final;
private:
friend base::NoDestructor<GlicKeyedServiceFactory>;
GlicKeyedServiceFactory();
~GlicKeyedServiceFactory() override;
};
}
#endif