Index: components/password_manager/content/browser/password_manager_internals_service_factory.cc |
diff --git a/components/password_manager/content/browser/password_manager_internals_service_factory.cc b/components/password_manager/content/browser/password_manager_internals_service_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7641ca84dd33922f8c3ef49d3d45d286384c1777 |
--- /dev/null |
+++ b/components/password_manager/content/browser/password_manager_internals_service_factory.cc |
@@ -0,0 +1,41 @@ |
+// 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 "components/password_manager/content/browser/password_manager_internals_service_factory.h" |
+ |
+#include "components/keyed_service/content/browser_context_dependency_manager.h" |
+#include "components/password_manager/core/browser/password_manager_internals_service.h" |
+ |
+namespace password_manager { |
+ |
+// 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 { |
+ return new PasswordManagerInternalsService(); |
+} |
+ |
+} // namespace password_manager |