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

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

Issue 1449933002: Fix leak in FirstWebContentsProfiler introduced by special recording for deprecated v1 startup stat… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/first_web_contents_profiler.cc
diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc
index 8626bf40ee96244283fd69842927e3da6db1af9e..8efb2c878c499f6e52390e9a45ca049e2420b427 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.cc
+++ b/chrome/browser/metrics/first_web_contents_profiler.cc
@@ -170,9 +170,15 @@ void FirstWebContentsProfiler::FinishedCollectingMetrics(
}
finished_ = true;
}
+
+ // Continue recording deprecated v1 stats (see |finished_|) except in
+ // scenarios where stats collection was already being abandonned previously.
// TODO(gab): Delete right away when getting rid of |finished_|.
- if (IsFinishedCollectingMetrics())
+ if (IsFinishedCollectingMetrics() ||
+ finish_reason == FinishReason::ABANDON_CONTENT_DESTROYED ||
+ finish_reason == FinishReason::ABANDON_BLOCKING_UI) {
delegate_->ProfilerFinishedCollectingMetrics();
+ }
}
#endif // !defined(OS_ANDROID)
« 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