BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / profile_resetter / automatic_profile_resetter_factory.h
blobbbf8012dc284b4a32a9b24b5e621d3601af1ea82
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"
11 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
14 } // namespace base
16 class PrefRegistrySimple;
18 namespace content {
19 class BrowserContext;
22 namespace user_prefs {
23 class PrefRegistrySyncable;
26 class AutomaticProfileResetter;
28 class AutomaticProfileResetterFactory
29 : public BrowserContextKeyedServiceFactory {
30 public:
31 static AutomaticProfileResetter* GetForBrowserContext(
32 content::BrowserContext* context);
33 static AutomaticProfileResetterFactory* GetInstance();
35 // Registers Local State preferences.
36 static void RegisterPrefs(PrefRegistrySimple* registry);
38 private:
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_