#ifndef CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_FACTORY_H_
#define CHROME_BROWSER_INVALIDATION_INVALIDATION_SERVICE_FACTORY_H_
#include "base/basictypes.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace user_prefs {
class PrefRegistrySyncable;
}
namespace syncer {
class Invalidator;
}
class Profile;
namespace invalidation {
class FakeInvalidationService;
class InvalidationService;
class P2PInvalidationService;
class InvalidationServiceFactory : public BrowserContextKeyedServiceFactory {
public:
static InvalidationService* GetForProfile(Profile* profile);
static InvalidationServiceFactory* GetInstance();
void RegisterTestingFactory(TestingFactoryFunction testing_factory);
private:
friend struct DefaultSingletonTraits<InvalidationServiceFactory>;
InvalidationServiceFactory();
virtual ~InvalidationServiceFactory();
virtual KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const OVERRIDE;
virtual void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
TestingFactoryFunction testing_factory_;
DISALLOW_COPY_AND_ASSIGN(InvalidationServiceFactory);
};
}
#endif