blob: bc9586be3f2fd2c5836ba8a221086e5e745e0f4d [file] [log] [blame]
// Copyright 2014 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_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_
#define CHROME_BROWSER_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_
#include "base/memory/singleton.h"
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
namespace language {
class AcceptLanguagesService;
}
// AcceptLanguagesServiceFactory is a way to associate an
// AcceptLanguagesService instance to a BrowserContext.
class AcceptLanguagesServiceFactory : public ProfileKeyedServiceFactory {
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;
};
#endif // CHROME_BROWSER_LANGUAGE_ACCEPT_LANGUAGES_SERVICE_FACTORY_H_