Index: chromecast/browser/metrics/cast_metrics_service_client.cc |
diff --git a/chromecast/browser/metrics/cast_metrics_service_client.cc b/chromecast/browser/metrics/cast_metrics_service_client.cc |
index 32b4c15130e4bdfcc73da854ac4bc92783b34123..b60bab4727ab748002b6590540faabff98791918 100644 |
--- a/chromecast/browser/metrics/cast_metrics_service_client.cc |
+++ b/chromecast/browser/metrics/cast_metrics_service_client.cc |
@@ -250,6 +250,12 @@ void CastMetricsServiceClient::Finalize() { |
// Set clean_shutdown bit. |
metrics_service_->RecordCompletedSessionEnd(); |
#endif // !defined(OS_ANDROID) |
+ |
+ // Stop metrics service cleanly before destructing CastMetricsServiceClient. |
+#if defined(OS_LINUX) |
+ external_metrics_.release()->DestroySelf(); |
+#endif // defined(OS_LINUX) |
+ metrics_service_.reset(); |
gunsch
2015/01/09 18:56:19
what's the purpose of this call? won't this happen
gfhuang
2015/01/09 19:10:45
Changed to Stop() to be more clear. and edited CL
|
} |
bool CastMetricsServiceClient::IsReportingEnabled() { |