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

Side by Side Diff: chrome/browser/supervised_user/chromeos/manager_password_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user/chromeos/manager_password_service_facto ry.h" 5 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto ry.h"
6 6
7 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 7 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
8 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 8 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
9 #include "chrome/browser/chromeos/profiles/profile_helper.h" 9 #include "chrome/browser/chromeos/profiles/profile_helper.h"
10 #include "chrome/browser/profiles/incognito_helpers.h" 10 #include "chrome/browser/profiles/incognito_helpers.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/supervised_user/chromeos/manager_password_service.h" 12 #include "chrome/browser/supervised_user/chromeos/manager_password_service.h"
13 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h" 13 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_ service_factory.h"
14 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac tory.h" 14 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac tory.h"
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" 15 #include "components/keyed_service/content/browser_context_dependency_manager.h"
16 #include "components/user_manager/user.h" 16 #include "components/user_manager/user.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 // static 20 // static
21 ManagerPasswordService* 21 ManagerPasswordService*
22 ManagerPasswordServiceFactory::GetForProfile(Profile* profile) { 22 ManagerPasswordServiceFactory::GetForProfile(Profile* profile) {
23 return static_cast<ManagerPasswordService*>( 23 return static_cast<ManagerPasswordService*>(
24 GetInstance()->GetServiceForBrowserContext(profile, true)); 24 GetInstance()->GetServiceForBrowserContext(profile, true));
25 } 25 }
26 26
27 // static 27 // static
28 ManagerPasswordServiceFactory* 28 ManagerPasswordServiceFactory*
29 ManagerPasswordServiceFactory::GetInstance() { 29 ManagerPasswordServiceFactory::GetInstance() {
30 return Singleton<ManagerPasswordServiceFactory>::get(); 30 return base::Singleton<ManagerPasswordServiceFactory>::get();
31 } 31 }
32 32
33 ManagerPasswordServiceFactory::ManagerPasswordServiceFactory() 33 ManagerPasswordServiceFactory::ManagerPasswordServiceFactory()
34 : BrowserContextKeyedServiceFactory( 34 : BrowserContextKeyedServiceFactory(
35 "ManagerPasswordService", 35 "ManagerPasswordService",
36 BrowserContextDependencyManager::GetInstance()) { 36 BrowserContextDependencyManager::GetInstance()) {
37 DependsOn(SupervisedUserSharedSettingsServiceFactory::GetInstance()); 37 DependsOn(SupervisedUserSharedSettingsServiceFactory::GetInstance());
38 DependsOn(SupervisedUserSyncServiceFactory::GetInstance()); 38 DependsOn(SupervisedUserSyncServiceFactory::GetInstance());
39 } 39 }
40 40
(...skipping 18 matching lines...) Expand all
59 return NULL; 59 return NULL;
60 } 60 }
61 61
62 content::BrowserContext* 62 content::BrowserContext*
63 ManagerPasswordServiceFactory::GetBrowserContextToUse( 63 ManagerPasswordServiceFactory::GetBrowserContextToUse(
64 content::BrowserContext* context) const { 64 content::BrowserContext* context) const {
65 return chrome::GetBrowserContextRedirectedInIncognito(context); 65 return chrome::GetBrowserContextRedirectedInIncognito(context);
66 } 66 }
67 67
68 } // namespace chromeos 68 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698