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

Side by Side Diff: chrome/browser/safe_browsing/certificate_reporting_service_factory.cc

Issue 2507253004: Add factory class for CertificateReportingService and a new metrics provider. (Closed)
Patch Set: Move classes to safe_browsing, estark comment Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/safe_browsing/certificate_reporting_service_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/certificate_reporting_service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698