| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 "chrome/browser/safe_browsing/certificate_reporting_service.h" |
| 6 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" |
| 7 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 8 |
| 9 // static |
| 10 CertificateReportingServiceFactory* |
| 11 CertificateReportingServiceFactory::GetInstance() { |
| 12 return base::Singleton<CertificateReportingServiceFactory>::get(); |
| 13 } |
| 14 |
| 15 // static |
| 16 CertificateReportingService* |
| 17 CertificateReportingServiceFactory::GetForBrowserContext( |
| 18 content::BrowserContext* context) { |
| 19 return static_cast<CertificateReportingService*>( |
| 20 GetInstance()->GetServiceForBrowserContext(context, true)); |
| 21 } |
| 22 |
| 23 CertificateReportingServiceFactory::CertificateReportingServiceFactory() |
| 24 : BrowserContextKeyedServiceFactory( |
| 25 "cert_reporting::Factory", |
| 26 BrowserContextDependencyManager::GetInstance()) {} |
| 27 |
| 28 CertificateReportingServiceFactory::~CertificateReportingServiceFactory() {} |
| 29 |
| 30 KeyedService* CertificateReportingServiceFactory::BuildServiceInstanceFor( |
| 31 content::BrowserContext* profile) const { |
| 32 return new CertificateReportingService(); |
| 33 } |
| 34 |
| 35 content::BrowserContext* |
| 36 CertificateReportingServiceFactory::GetBrowserContextToUse( |
| 37 content::BrowserContext* context) const { |
| 38 return context; |
| 39 } |
| OLD | NEW |