Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / media_galleries / media_galleries_preferences_factory.h
bloba97a4aed57dd2de86eb6c6694f7ee21ca784fa47
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/browser_context_keyed_service/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 DefaultSingletonTraits<MediaGalleriesPreferencesFactory>;
29 MediaGalleriesPreferencesFactory();
30 virtual ~MediaGalleriesPreferencesFactory();
32 // BrowserContextKeyedServiceFactory:
33 virtual BrowserContextKeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const OVERRIDE;
35 virtual void RegisterProfilePrefs(
36 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
37 virtual 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_