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

Side by Side Diff: components/password_manager/content/browser/password_manager_internals_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 "components/password_manager/content/browser/password_manager_internals _service_factory.h" 5 #include "components/password_manager/content/browser/password_manager_internals _service_factory.h"
6 6
7 #include "components/keyed_service/content/browser_context_dependency_manager.h" 7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
8 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h" 8 #include "components/password_manager/core/browser/password_manager_internals_se rvice.h"
9 9
10 namespace password_manager { 10 namespace password_manager {
11 11
12 // static 12 // static
13 PasswordManagerInternalsService* 13 PasswordManagerInternalsService*
14 PasswordManagerInternalsServiceFactory::GetForBrowserContext( 14 PasswordManagerInternalsServiceFactory::GetForBrowserContext(
15 content::BrowserContext* context) { 15 content::BrowserContext* context) {
16 return static_cast<PasswordManagerInternalsService*>( 16 return static_cast<PasswordManagerInternalsService*>(
17 GetInstance()->GetServiceForBrowserContext(context, /* create = */ true)); 17 GetInstance()->GetServiceForBrowserContext(context, /* create = */ true));
18 } 18 }
19 19
20 // static 20 // static
21 PasswordManagerInternalsServiceFactory* 21 PasswordManagerInternalsServiceFactory*
22 PasswordManagerInternalsServiceFactory::GetInstance() { 22 PasswordManagerInternalsServiceFactory::GetInstance() {
23 return Singleton<PasswordManagerInternalsServiceFactory>::get(); 23 return base::Singleton<PasswordManagerInternalsServiceFactory>::get();
24 } 24 }
25 25
26 PasswordManagerInternalsServiceFactory::PasswordManagerInternalsServiceFactory() 26 PasswordManagerInternalsServiceFactory::PasswordManagerInternalsServiceFactory()
27 : BrowserContextKeyedServiceFactory( 27 : BrowserContextKeyedServiceFactory(
28 "PasswordManagerInternalsService", 28 "PasswordManagerInternalsService",
29 BrowserContextDependencyManager::GetInstance()) { 29 BrowserContextDependencyManager::GetInstance()) {
30 } 30 }
31 31
32 PasswordManagerInternalsServiceFactory:: 32 PasswordManagerInternalsServiceFactory::
33 ~PasswordManagerInternalsServiceFactory() { 33 ~PasswordManagerInternalsServiceFactory() {
34 } 34 }
35 35
36 KeyedService* PasswordManagerInternalsServiceFactory::BuildServiceInstanceFor( 36 KeyedService* PasswordManagerInternalsServiceFactory::BuildServiceInstanceFor(
37 content::BrowserContext* /* context */) const { 37 content::BrowserContext* /* context */) const {
38 return new PasswordManagerInternalsService(); 38 return new PasswordManagerInternalsService();
39 } 39 }
40 40
41 } // namespace password_manager 41 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698