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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 2345933002: Break chrome_initial's dependence on //components/startup_metric_utils/browser:lib (Closed)
Patch Set: fdoray feedback Created 4 years, 3 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/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index aed0427230ba5a2cc4661c62f0c0597b37188047..8ec78fb4943c179dd0d01d59630e03b24353500d 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -434,7 +434,9 @@ void InitLogging(const std::string& process_type) {
#endif
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
-void RecordMainStartupMetrics() {
+void RecordMainStartupMetrics(base::TimeTicks exe_entry_point_ticks) {
+ if (!exe_entry_point_ticks.is_null())
+ startup_metric_utils::RecordExeMainEntryPointTicks(exe_entry_point_ticks);
#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
// Record the startup process creation time on supported platforms.
startup_metric_utils::RecordStartupProcessCreationTime(
@@ -454,13 +456,16 @@ void RecordMainStartupMetrics() {
} // namespace
-ChromeMainDelegate::ChromeMainDelegate() {
+ChromeMainDelegate::ChromeMainDelegate()
+ : ChromeMainDelegate(base::TimeTicks()) {}
+
+ChromeMainDelegate::ChromeMainDelegate(base::TimeTicks exe_entry_point_ticks) {
#if !defined(CHROME_MULTIPLE_DLL_CHILD)
// Record startup metrics in the browser process. For component builds, there
// is no way to know the type of process (process command line is not yet
// initialized), so the function below will also be called in renderers.
// This doesn't matter as it simply sets global variables.
- RecordMainStartupMetrics();
+ RecordMainStartupMetrics(exe_entry_point_ticks);
#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
}

Powered by Google App Engine
This is Rietveld 408576698