blob: 2ee877770fae12a8afd11459e3bcc5bc06a1cb47 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_
#define CHROME_BROWSER_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace language {
class AcceptLanguagesService;
}
// AcceptLanguagesServiceFactory is a way to associate an
// AcceptLanguagesService instance to a BrowserContext.
class AcceptLanguagesServiceFactory : public BrowserContextKeyedServiceFactory {
public:
static language::AcceptLanguagesService* GetForBrowserContext(
content::BrowserContext* browser_context);
static AcceptLanguagesServiceFactory* GetInstance();
AcceptLanguagesServiceFactory(const AcceptLanguagesServiceFactory&) = delete;
AcceptLanguagesServiceFactory& operator=(
const AcceptLanguagesServiceFactory&) = delete;
private:
friend struct base::DefaultSingletonTraits<AcceptLanguagesServiceFactory>;
AcceptLanguagesServiceFactory();
~AcceptLanguagesServiceFactory() override;
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
};
#endif // CHROME_BROWSER_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_