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/keyed_service/content/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 ~AutomaticProfileResetterFactory() override
;
42 // BrowserContextKeyedServiceFactory:
43 KeyedService
* BuildServiceInstanceFor(
44 content::BrowserContext
* context
) const override
;
46 // BrowserContextKeyedBaseFactory:
47 void RegisterProfilePrefs(
48 user_prefs::PrefRegistrySyncable
* registry
) override
;
49 bool ServiceIsCreatedWithBrowserContext() const override
;
50 bool ServiceIsNULLWhileTesting() const override
;
52 DISALLOW_COPY_AND_ASSIGN(AutomaticProfileResetterFactory
);
55 #endif // CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_