1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_
6 #define CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
12 struct DefaultSingletonTraits
;
14 class PrefRegistrySimple
;
20 namespace user_prefs
{
21 class PrefRegistrySyncable
;
24 class AutomaticProfileResetter
;
26 class AutomaticProfileResetterFactory
27 : public BrowserContextKeyedServiceFactory
{
29 static AutomaticProfileResetter
* GetForBrowserContext(
30 content::BrowserContext
* context
);
31 static AutomaticProfileResetterFactory
* GetInstance();
33 // Registers Local State preferences.
34 static void RegisterPrefs(PrefRegistrySimple
* registry
);
37 friend struct DefaultSingletonTraits
<AutomaticProfileResetterFactory
>;
39 AutomaticProfileResetterFactory();
40 virtual ~AutomaticProfileResetterFactory();
42 // BrowserContextKeyedServiceFactory:
43 virtual BrowserContextKeyedService
* BuildServiceInstanceFor(
44 content::BrowserContext
* context
) const OVERRIDE
;
46 // BrowserContextKeyedBaseFactory:
47 virtual void RegisterProfilePrefs(
48 user_prefs::PrefRegistrySyncable
* registry
) OVERRIDE
;
49 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE
;
50 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE
;
52 DISALLOW_COPY_AND_ASSIGN(AutomaticProfileResetterFactory
);
55 #endif // CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_