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

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

Issue 949293002: Implement a poor man's PostAfterStartupTask() function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
Index: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
index 4eca8affbe670aa975dd0cff50dc0c88cf67b553..4f6f2f3344a1821bdadb94ccc60931441ebf0c82 100644
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
@@ -265,6 +265,8 @@ void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() {
first_web_contents_profiler_ =
FirstWebContentsProfiler::CreateProfilerForFirstWebContents(this).Pass();
#endif // !defined(OS_ANDROID)
+ if (!first_web_contents_profiler_)
+ chrome::SetBrowserStartupIsComplete();
}
void ChromeBrowserMainExtraPartsMetrics::OnDisplayAdded(
@@ -284,6 +286,10 @@ void ChromeBrowserMainExtraPartsMetrics::OnDisplayMetricsChanged(
void ChromeBrowserMainExtraPartsMetrics::ProfilerFinishedCollectingMetrics() {
first_web_contents_profiler_.reset();
+
+ // TODO(michaeln): Revisit this in light of session restore, for now
+ // claim complete after the first page loads.
+ chrome::SetBrowserStartupIsComplete();
gab 2015/03/10 15:00:32 Doesn't feel like ExtraPartsMetrics is the right p
michaeln 2015/03/10 19:46:26 Ditto any guidance. I picked this location becaus
gab 2015/03/10 19:55:27 Then perhaps put it directly in FirstWebContentsPr
michaeln 2015/03/20 00:21:27 I put it directly into ChromeBrowserMainParts, not
}
void ChromeBrowserMainExtraPartsMetrics::EmitDisplaysChangedMetric() {

Powered by Google App Engine
This is Rietveld 408576698