/chrome/browser/profile_resetter/automatic_profile_resetter_factory.h

https://gitlab.com/jonnialva90/iridium-browser · C Header · 57 lines · 36 code · 15 blank · 6 comment · 0 complexity · d3b1eb748fef34f3ba7be5c5a0acd2a3 MD5 · raw file

  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.
  4. #ifndef CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_
  5. #define CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_
  6. #include "base/basictypes.h"
  7. #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
  8. namespace base {
  9. template <typename T>
  10. struct DefaultSingletonTraits;
  11. } // namespace base
  12. class PrefRegistrySimple;
  13. namespace content {
  14. class BrowserContext;
  15. }
  16. namespace user_prefs {
  17. class PrefRegistrySyncable;
  18. }
  19. class AutomaticProfileResetter;
  20. class AutomaticProfileResetterFactory
  21. : public BrowserContextKeyedServiceFactory {
  22. public:
  23. static AutomaticProfileResetter* GetForBrowserContext(
  24. content::BrowserContext* context);
  25. static AutomaticProfileResetterFactory* GetInstance();
  26. // Registers Local State preferences.
  27. static void RegisterPrefs(PrefRegistrySimple* registry);
  28. private:
  29. friend struct base::DefaultSingletonTraits<AutomaticProfileResetterFactory>;
  30. AutomaticProfileResetterFactory();
  31. ~AutomaticProfileResetterFactory() override;
  32. // BrowserContextKeyedServiceFactory:
  33. KeyedService* BuildServiceInstanceFor(
  34. content::BrowserContext* context) const override;
  35. // BrowserContextKeyedBaseFactory:
  36. void RegisterProfilePrefs(
  37. user_prefs::PrefRegistrySyncable* registry) override;
  38. bool ServiceIsCreatedWithBrowserContext() const override;
  39. bool ServiceIsNULLWhileTesting() const override;
  40. DISALLOW_COPY_AND_ASSIGN(AutomaticProfileResetterFactory);
  41. };
  42. #endif // CHROME_BROWSER_PROFILE_RESETTER_AUTOMATIC_PROFILE_RESETTER_FACTORY_H_