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

Side by Side Diff: chrome/browser/chromeos/extensions/users_private/users_private_delegate_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromeos/extensions/users_private/users_private_delegat e_factory.h" 5 #include "chrome/browser/chromeos/extensions/users_private/users_private_delegat e_factory.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chromeos/extensions/users_private/users_private_delegat e.h" 8 #include "chrome/browser/chromeos/extensions/users_private/users_private_delegat e.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 #include "extensions/browser/extension_system_provider.h" 11 #include "extensions/browser/extension_system_provider.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 using content::BrowserContext; 15 using content::BrowserContext;
16 16
17 // static 17 // static
18 UsersPrivateDelegate* UsersPrivateDelegateFactory::GetForBrowserContext( 18 UsersPrivateDelegate* UsersPrivateDelegateFactory::GetForBrowserContext(
19 BrowserContext* browser_context) { 19 BrowserContext* browser_context) {
20 return static_cast<UsersPrivateDelegate*>( 20 return static_cast<UsersPrivateDelegate*>(
21 GetInstance()->GetServiceForBrowserContext(browser_context, true)); 21 GetInstance()->GetServiceForBrowserContext(browser_context, true));
22 } 22 }
23 23
24 // static 24 // static
25 UsersPrivateDelegateFactory* UsersPrivateDelegateFactory::GetInstance() { 25 UsersPrivateDelegateFactory* UsersPrivateDelegateFactory::GetInstance() {
26 return Singleton<UsersPrivateDelegateFactory>::get(); 26 return base::Singleton<UsersPrivateDelegateFactory>::get();
27 } 27 }
28 28
29 UsersPrivateDelegateFactory::UsersPrivateDelegateFactory() 29 UsersPrivateDelegateFactory::UsersPrivateDelegateFactory()
30 : BrowserContextKeyedServiceFactory( 30 : BrowserContextKeyedServiceFactory(
31 "UsersPrivateDelegate", 31 "UsersPrivateDelegate",
32 BrowserContextDependencyManager::GetInstance()) { 32 BrowserContextDependencyManager::GetInstance()) {
33 } 33 }
34 34
35 UsersPrivateDelegateFactory::~UsersPrivateDelegateFactory() { 35 UsersPrivateDelegateFactory::~UsersPrivateDelegateFactory() {
36 } 36 }
37 37
38 KeyedService* UsersPrivateDelegateFactory::BuildServiceInstanceFor( 38 KeyedService* UsersPrivateDelegateFactory::BuildServiceInstanceFor(
39 content::BrowserContext* profile) const { 39 content::BrowserContext* profile) const {
40 return new UsersPrivateDelegate(static_cast<Profile*>(profile)); 40 return new UsersPrivateDelegate(static_cast<Profile*>(profile));
41 } 41 }
42 42
43 } // namespace extensions 43 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698