BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / media_galleries / media_galleries_preferences_factory.h
blobbd94e8a5fb375fe76f6eafe4f77d2f91f348e791
1 // Copyright (c) 2012 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_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 class MediaGalleriesPreferences;
13 class Profile;
15 // Singleton that owns all MediaGalleriesPreferences and associates them with
16 // Profiles.
17 class MediaGalleriesPreferencesFactory
18 : public BrowserContextKeyedServiceFactory {
19 public:
20 // Use MediaFileSystemRegistry::GetPreferences() to get
21 // MediaGalleriesPreferences.
22 static MediaGalleriesPreferences* GetForProfile(Profile* profile);
24 static MediaGalleriesPreferencesFactory* GetInstance();
26 private:
27 friend struct base::DefaultSingletonTraits<MediaGalleriesPreferencesFactory>;
29 MediaGalleriesPreferencesFactory();
30 ~MediaGalleriesPreferencesFactory() override;
32 // BrowserContextKeyedServiceFactory:
33 KeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const override;
35 void RegisterProfilePrefs(
36 user_prefs::PrefRegistrySyncable* registry) override;
37 content::BrowserContext* GetBrowserContextToUse(
38 content::BrowserContext* context) const override;
40 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferencesFactory);
43 #endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_