Chromium Code Reviews| Index: chrome/browser/password_manager/password_manager_internals_service_factory.cc |
| diff --git a/chrome/browser/password_manager/password_manager_internals_service_factory.cc b/chrome/browser/password_manager/password_manager_internals_service_factory.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c92850f503ddc0b0d473b783510ecabf9680e127 |
| --- /dev/null |
| +++ b/chrome/browser/password_manager/password_manager_internals_service_factory.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/password_manager/password_manager_internals_service_factory.h" |
| + |
| +#include "chrome/browser/password_manager/password_manager_internals_service.h" |
| +#include "components/keyed_service/content/browser_context_dependency_manager.h" |
| + |
| +// static |
| +PasswordManagerInternalsService* |
| +PasswordManagerInternalsServiceFactory::GetForBrowserContext( |
| + content::BrowserContext* context) { |
| + return static_cast<PasswordManagerInternalsService*>( |
| + GetInstance()->GetServiceForBrowserContext(context, /*create = */ true)); |
| +} |
| + |
| +// static |
| +PasswordManagerInternalsServiceFactory* |
| +PasswordManagerInternalsServiceFactory::GetInstance() { |
| + return Singleton<PasswordManagerInternalsServiceFactory>::get(); |
| +} |
| + |
| +PasswordManagerInternalsServiceFactory::PasswordManagerInternalsServiceFactory() |
| + : BrowserContextKeyedServiceFactory( |
| + "PasswordManagerInternalsService", |
| + BrowserContextDependencyManager::GetInstance()) { |
| +} |
| + |
| +PasswordManagerInternalsServiceFactory:: |
| + ~PasswordManagerInternalsServiceFactory() { |
| +} |
| + |
| +KeyedService* PasswordManagerInternalsServiceFactory::BuildServiceInstanceFor( |
| + content::BrowserContext* /*context*/) const { |
|
Ilya Sherman
2014/05/02 23:38:38
nit: Please leave spaces next to the asterisks, i.
vabr (Chromium)
2014/05/06 13:16:30
Done.
|
| + return new PasswordManagerInternalsService(); |
| +} |