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

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

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)
Patch Set: jialiul, estark comments 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
OLDNEW
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(
estark 2016/12/16 23:39:04 I am very stupid for not realizing this earlier, b
meacer 2016/12/17 01:23:21 That's a scary bug. It looks like NOTIFICATION_PRO
meacer 2016/12/21 23:11:05 I believe this is fixed now. The fix is based on h
23 profile_manager->GetLastUsedProfile());
24 if (service)
25 service->SendPending();
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698