| Index: chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc
|
| diff --git a/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc b/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc
|
| index b7304bc2d3d662bde51aa73d9cbc08fb4bb29d9b..4209433256434f95fd426c750bd6f769a63ad03f 100644
|
| --- a/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc
|
| +++ b/chrome/browser/safe_browsing/certificate_reporting_metrics_provider.cc
|
| @@ -14,4 +14,20 @@ CertificateReportingMetricsProvider::CertificateReportingMetricsProvider() {}
|
| CertificateReportingMetricsProvider::~CertificateReportingMetricsProvider() {}
|
|
|
| void CertificateReportingMetricsProvider::ProvideGeneralMetrics(
|
| - metrics::ChromeUserMetricsExtension* unused) {}
|
| + metrics::ChromeUserMetricsExtension* unused) {
|
| + ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| + if (!profile_manager)
|
| + return;
|
| +
|
| + // Do not try to create profile here if it does not exist, because this method
|
| + // can be called during browser shutdown.
|
| + Profile* profile = profile_manager->GetProfileByPath(
|
| + profile_manager->GetLastUsedProfileDir(profile_manager->user_data_dir()));
|
| + if (!profile)
|
| + return;
|
| +
|
| + CertificateReportingService* service =
|
| + CertificateReportingServiceFactory::GetForBrowserContext(profile);
|
| + if (service)
|
| + service->SendPending();
|
| +}
|
|
|