Home | History | Annotate | Download | only in browser
      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
      3 // found in the LICENSE file.
      4 
      5 #include "components/password_manager/content/browser/password_manager_internals_service_factory.h"
      6 
      7 #include "components/keyed_service/content/browser_context_dependency_manager.h"
      8 #include "components/password_manager/core/browser/password_manager_internals_service.h"
      9 
     10 namespace password_manager {
     11 
     12 // static
     13 PasswordManagerInternalsService*
     14 PasswordManagerInternalsServiceFactory::GetForBrowserContext(
     15     content::BrowserContext* context) {
     16   return static_cast<PasswordManagerInternalsService*>(
     17       GetInstance()->GetServiceForBrowserContext(context, /* create = */ true));
     18 }
     19 
     20 // static
     21 PasswordManagerInternalsServiceFactory*
     22 PasswordManagerInternalsServiceFactory::GetInstance() {
     23   return Singleton<PasswordManagerInternalsServiceFactory>::get();
     24 }
     25 
     26 PasswordManagerInternalsServiceFactory::PasswordManagerInternalsServiceFactory()
     27     : BrowserContextKeyedServiceFactory(
     28           "PasswordManagerInternalsService",
     29           BrowserContextDependencyManager::GetInstance()) {
     30 }
     31 
     32 PasswordManagerInternalsServiceFactory::
     33     ~PasswordManagerInternalsServiceFactory() {
     34 }
     35 
     36 KeyedService* PasswordManagerInternalsServiceFactory::BuildServiceInstanceFor(
     37     content::BrowserContext* /* context */) const {
     38   return new PasswordManagerInternalsService();
     39 }
     40 
     41 }  // namespace password_manager
     42