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

Unified Diff: chrome/browser/metrics/https_engagement_metrics_provider.cc

Issue 2531023002: Don't create profile in HttpsEngagementMetricsProvider (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/https_engagement_metrics_provider.cc
diff --git a/chrome/browser/metrics/https_engagement_metrics_provider.cc b/chrome/browser/metrics/https_engagement_metrics_provider.cc
index d75bd91c6ea995b9ca979455ba2b231a8a0a45df..b2770ca01c0fa23ca29d92c5c111a7d36898fb88 100644
--- a/chrome/browser/metrics/https_engagement_metrics_provider.cc
+++ b/chrome/browser/metrics/https_engagement_metrics_provider.cc
@@ -19,9 +19,14 @@ void HttpsEngagementMetricsProvider::ProvideGeneralMetrics(
if (!profile_manager)
return;
+ Profile* profile = profile_manager->GetProfileByPath(
Alexei Svitkine (slow) 2016/11/25 18:42:02 Please add a comment about this.
+ profile_manager->GetLastUsedProfileDir(
+ profile_manager->user_data_dir()));
+ if (!profile)
+ return;
+
HttpsEngagementService* engagement_service =
- HttpsEngagementServiceFactory::GetForBrowserContext(
- profile_manager->GetLastUsedProfile());
+ HttpsEngagementServiceFactory::GetForBrowserContext(profile);
if (!engagement_service)
return;
engagement_service->StoreMetricsAndClear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698