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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 1413153010: Move components/startup_metric_utils/* to components/startup_metric_utils/browser/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove chrome_child.dll dependency on startup_metric_utils. Created 5 years, 2 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
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index b6c7bac122185d0b94c9d53b9d8d86c0fd028c67..caf37fc724999c112950d7ea4bf346cf9ae5b7d6 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -40,7 +40,6 @@
#include "chrome/utility/chrome_content_utility_client.h"
#include "components/component_updater/component_updater_paths.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
-#include "components/startup_metric_utils/startup_metric_utils.h"
#include "components/version_info/version_info.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
@@ -126,6 +125,10 @@
#include "pdf/pdf.h"
#endif
+#if !defined(CHROME_MULTIPLE_DLL_CHILD)
+#include "components/startup_metric_utils/browser/startup_metric_utils.h"
+#endif
+
#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
#include "chrome/child/pdf_child_init.h"
@@ -403,9 +406,8 @@ void InitLogging(const std::string& process_type) {
}
#endif
-} // namespace
-
-ChromeMainDelegate::ChromeMainDelegate() {
+#if !defined(CHROME_MULTIPLE_DLL_CHILD)
+void RecordMainStartupMetrics() {
#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
// Record the startup process creation time on supported platforms.
startup_metric_utils::RecordStartupProcessCreationTime(
@@ -421,6 +423,16 @@ ChromeMainDelegate::ChromeMainDelegate() {
startup_metric_utils::RecordMainEntryPointTime(base::Time::Now());
#endif
}
+#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
+
+} // namespace
+
+ChromeMainDelegate::ChromeMainDelegate() {
+#if !defined(CHROME_MULTIPLE_DLL_CHILD)
+ // Record startup metrics in the browser process only.
+ RecordMainStartupMetrics();
gab 2015/10/29 16:03:27 I think this should only be recorded in the browse
fdoray 2015/10/29 17:00:01 Unfortunately, CHROME_MULTIPLE_DLL_BROWSER/_CHILD
gab 2015/10/29 17:18:28 I see. Then I guess this works (I don't like negat
+#endif // !defined(CHROME_MULTIPLE_DLL_CHILD)
+}
ChromeMainDelegate::~ChromeMainDelegate() {
}
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698