OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "chrome/browser/media_gallery/media_gallery_registry_factory.h" | |
6 | |
7 #include "chrome/browser/media_gallery/media_gallery_registry.h" | |
8 #include "chrome/browser/profiles/profile_dependency_manager.h" | |
9 | |
10 // static | |
11 MediaGalleryRegistry* MediaGalleryRegistryFactory::GetForProfile( | |
12 Profile* profile) { | |
13 return static_cast<MediaGalleryRegistry*>( | |
14 GetInstance()->GetServiceForProfile(profile, true)); | |
15 } | |
16 | |
17 // static | |
18 MediaGalleryRegistryFactory* MediaGalleryRegistryFactory::GetInstance() { | |
19 return Singleton<MediaGalleryRegistryFactory>::get(); | |
20 } | |
21 | |
22 MediaGalleryRegistryFactory::MediaGalleryRegistryFactory() | |
23 : ProfileKeyedServiceFactory("MediaGalleryRegistry", | |
24 ProfileDependencyManager::GetInstance()) {} | |
25 | |
26 MediaGalleryRegistryFactory::~MediaGalleryRegistryFactory() {} | |
27 | |
28 ProfileKeyedService* MediaGalleryRegistryFactory::BuildServiceInstanceFor( | |
29 Profile* profile) const { | |
30 return new MediaGalleryRegistry(profile); | |
31 } | |
32 | |
33 void MediaGalleryRegistryFactory::RegisterUserPrefs(PrefService* prefs) { | |
34 MediaGalleryRegistry::RegisterUserPrefs(prefs); | |
35 } | |
36 | |
37 bool MediaGalleryRegistryFactory::ServiceRedirectedInIncognito() { | |
38 return true; | |
39 } | |
OLD | NEW |