Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/media_gallery/media_galleries_preferences_factory.cc

Issue 10821077: Add gallery permissions to Media Galleries Preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h" 5 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h"
6 6
7 #include "chrome/browser/media_gallery/media_galleries_preferences.h" 7 #include "chrome/browser/media_gallery/media_galleries_preferences.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h" 8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 9
10 // static 10 // static
11 MediaGalleriesPreferences* MediaGalleriesPreferencesFactory::GetForProfile( 11 chrome::MediaGalleriesPreferences*
12 Profile* profile) { 12 MediaGalleriesPreferencesFactory::GetForProfile(Profile* profile) {
13 return static_cast<MediaGalleriesPreferences*>( 13 return static_cast<chrome::MediaGalleriesPreferences*>(
14 GetInstance()->GetServiceForProfile(profile, true)); 14 GetInstance()->GetServiceForProfile(profile, true));
15 } 15 }
16 16
17 // static 17 // static
18 MediaGalleriesPreferencesFactory* 18 MediaGalleriesPreferencesFactory*
19 MediaGalleriesPreferencesFactory::GetInstance() { 19 MediaGalleriesPreferencesFactory::GetInstance() {
20 return Singleton<MediaGalleriesPreferencesFactory>::get(); 20 return Singleton<MediaGalleriesPreferencesFactory>::get();
21 } 21 }
22 22
23 MediaGalleriesPreferencesFactory::MediaGalleriesPreferencesFactory() 23 MediaGalleriesPreferencesFactory::MediaGalleriesPreferencesFactory()
24 : ProfileKeyedServiceFactory("MediaGalleriesPreferences", 24 : ProfileKeyedServiceFactory("MediaGalleriesPreferences",
25 ProfileDependencyManager::GetInstance()) {} 25 ProfileDependencyManager::GetInstance()) {}
26 26
27 MediaGalleriesPreferencesFactory::~MediaGalleriesPreferencesFactory() {} 27 MediaGalleriesPreferencesFactory::~MediaGalleriesPreferencesFactory() {}
28 28
29 ProfileKeyedService* MediaGalleriesPreferencesFactory::BuildServiceInstanceFor( 29 ProfileKeyedService* MediaGalleriesPreferencesFactory::BuildServiceInstanceFor(
30 Profile* profile) const { 30 Profile* profile) const {
31 return new MediaGalleriesPreferences(profile); 31 return new chrome::MediaGalleriesPreferences(profile);
32 } 32 }
33 33
34 void MediaGalleriesPreferencesFactory::RegisterUserPrefs(PrefService* prefs) { 34 void MediaGalleriesPreferencesFactory::RegisterUserPrefs(PrefService* prefs) {
35 MediaGalleriesPreferences::RegisterUserPrefs(prefs); 35 chrome::MediaGalleriesPreferences::RegisterUserPrefs(prefs);
36 } 36 }
37 37
38 bool MediaGalleriesPreferencesFactory::ServiceRedirectedInIncognito() { 38 bool MediaGalleriesPreferencesFactory::ServiceRedirectedInIncognito() {
39 return true; 39 return true;
40 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698