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

Unified Diff: components/password_manager/content/browser/password_manager_internals_service_factory.cc

Issue 262583007: Password manager internals page service: introduction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also tests use the right namespace Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698