Chromium Code Reviews| 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..cb27994b8fdcd829186db4620c494a8624350bfc 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,19 @@ 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. 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. |
|
fdoray
2015/10/30 18:15:31
process command line initialized here: content::Co
|
| + // This doesn't matter as it simply sets global variables. |
| + RecordMainStartupMetrics(); |
| +#endif // !defined(CHROME_MULTIPLE_DLL_CHILD) |
| +} |
| ChromeMainDelegate::~ChromeMainDelegate() { |
| } |