blob: 5e942c99c8f6cae0dae0edd4c2ed6481f339c267 [file] [log] [blame]
// Copyright 2015 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_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_FACTORY_H_
#define CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_FACTORY_H_
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h"
class HostContentSettingsMap;
class Profile;
class HostContentSettingsMapFactory
: public RefcountedBrowserContextKeyedServiceFactory {
public:
static HostContentSettingsMap* GetForProfile(Profile* profile);
static HostContentSettingsMapFactory* GetInstance();
private:
friend struct base::DefaultSingletonTraits<HostContentSettingsMapFactory>;
HostContentSettingsMapFactory();
~HostContentSettingsMapFactory() override;
// RefcountedBrowserContextKeyedServiceFactory methods:
scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMapFactory);
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_FACTORY_H_