Avi Drissman | 4a8573c | 2022-09-09 19:35:54 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_FONT_PREF_CHANGE_NOTIFIER_FACTORY_H_ |
| 6 | #define CHROME_BROWSER_FONT_PREF_CHANGE_NOTIFIER_FACTORY_H_ |
| 7 | |
Mikel Astiz | 9d3e580 | 2023-05-30 21:42:30 | [diff] [blame] | 8 | #include "base/no_destructor.h" |
Ryan Sultanem | 66dded2b | 2022-08-22 10:34:15 | [diff] [blame] | 9 | #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 10 | |
| 11 | class FontPrefChangeNotifier; |
| 12 | class Profile; |
| 13 | |
| 14 | // Keyed service factory for a FontPrefChangeNotifier. |
Ryan Sultanem | 66dded2b | 2022-08-22 10:34:15 | [diff] [blame] | 15 | class FontPrefChangeNotifierFactory : public ProfileKeyedServiceFactory { |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 16 | public: |
| 17 | static FontPrefChangeNotifier* GetForProfile(Profile* profile); |
| 18 | |
| 19 | static FontPrefChangeNotifierFactory* GetInstance(); |
| 20 | |
| 21 | private: |
Mikel Astiz | 9d3e580 | 2023-05-30 21:42:30 | [diff] [blame] | 22 | friend base::NoDestructor<FontPrefChangeNotifierFactory>; |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 23 | |
| 24 | FontPrefChangeNotifierFactory(); |
| 25 | ~FontPrefChangeNotifierFactory() override; |
| 26 | |
| 27 | // BrowserContextKeyedServiceFactory overrides: |
Arthur Milchior | 93e5fc43 | 2023-08-22 18:29:39 | [diff] [blame] | 28 | std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext( |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 29 | content::BrowserContext* context) const override; |
Brett Wilson | 21cf626a | 2017-09-07 00:30:20 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | #endif // CHROME_BROWSER_FONT_PREF_CHANGE_NOTIFIER_FACTORY_H_ |