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"
13 struct DefaultSingletonTraits
;
16 class PrefRegistrySimple
;
22 namespace user_prefs
{
23 class PrefRegistrySyncable
;
26 class AutomaticProfileResetter
;
28 class AutomaticProfileResetterFactory
29 : public BrowserContextKeyedServiceFactory
{
31 static AutomaticProfileResetter
* GetForBrowserContext(
32 content::BrowserContext
* context
);
33 static AutomaticProfileResetterFactory
* GetInstance();
35 // Registers Local State preferences.
36 static void RegisterPrefs(PrefRegistrySimple
* registry
);
39 friend struct base::DefaultSingletonTraits
<AutomaticProfileResetterFactory
>;
41 AutomaticProfileResetterFactory();
42 ~AutomaticProfileResetterFactory() override
;
44 // BrowserContextKeyedServiceFactory:
45 KeyedService
* BuildServiceInstanceFor(
46 content::BrowserContext
* context
) const override
;
48 // BrowserContextKeyedBaseFactory:
49 void RegisterProfilePrefs(
50 user_prefs::PrefRegistrySyncable
* registry
) override
;
51 bool ServiceIsCreatedWithBrowserContext() const override
;
52 bool ServiceIsNULLWhileTesting() const override
;
54 DISALLOW_COPY_AND_ASSIGN(AutomaticProfileResetterFactory
);
57 #endif // CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_