| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/certificate_reporting_metrics_provider.h" | 5 #include "chrome/browser/safe_browsing/certificate_reporting_metrics_provider.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
| 8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
| 9 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" | 9 #include "chrome/browser/safe_browsing/certificate_reporting_service.h" |
| 10 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" | 10 #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h" |
| 11 | 11 |
| 12 CertificateReportingMetricsProvider::CertificateReportingMetricsProvider() {} | 12 CertificateReportingMetricsProvider::CertificateReportingMetricsProvider() {} |
| 13 | 13 |
| 14 CertificateReportingMetricsProvider::~CertificateReportingMetricsProvider() {} | 14 CertificateReportingMetricsProvider::~CertificateReportingMetricsProvider() {} |
| 15 | 15 |
| 16 void CertificateReportingMetricsProvider::ProvideGeneralMetrics( | 16 void CertificateReportingMetricsProvider::ProvideGeneralMetrics( |
| 17 metrics::ChromeUserMetricsExtension* unused) {} | 17 metrics::ChromeUserMetricsExtension* unused) { |
| 18 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 19 if (!profile_manager) |
| 20 return; |
| 21 CertificateReportingService* service = |
| 22 CertificateReportingServiceFactory::GetForBrowserContext( |
| 23 profile_manager->GetLastUsedProfile()); |
| 24 if (!service) |
| 25 return; |
| 26 service->SendPending(); |
| 27 } |
| OLD | NEW |