Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index 19a377e00806b21c43b962e24f91e4baf94a9442..478a41cf691e66e8c73037156dd11ded9bd76676 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -213,6 +213,7 @@ |
| #include "chrome/installer/util/helper.h" |
| #include "chrome/installer/util/install_util.h" |
| #include "chrome/installer/util/shell_util.h" |
| +#include "components/crash/content/app/crashpad.h" |
| #include "ui/base/l10n/l10n_util_win.h" |
| #include "ui/shell_dialogs/select_file_dialog.h" |
| #endif // defined(OS_WIN) |
| @@ -1411,6 +1412,18 @@ void ChromeBrowserMainParts::PostBrowserStart() { |
| int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
| TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); |
| +#if defined(OS_WIN) |
| + HMODULE chrome_elf = GetModuleHandle(chrome::kChromeElfDllName); |
| + if (chrome_elf) { |
| + auto block_until_handler_started = reinterpret_cast<void (*)()>( |
| + GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl")); |
|
robertshield
2016/12/09 01:56:44
This isn't in elf's .def file. Should it be?
scottmg
2016/12/09 20:23:14
We seem to have a mix of __declspec(dllexport) and
robertshield
2016/12/09 21:11:47
No worries, just thought it was a bit weird that w
scottmg
2016/12/13 18:46:59
Yeah, it's a bit messy. I think "Impl" has been us
|
| + if (block_until_handler_started) { |
| + SCOPED_UMA_HISTOGRAM_TIMER("Startup.BlockForCrashpadHandlerStartupTime"); |
| + block_until_handler_started(); |
|
robertshield
2016/12/09 21:11:47
This is a WaitForSingleObject(.., INFINITE) at Chr
scottmg
2016/12/13 18:46:59
Updated so that it waits a maximum of 5s. There's
|
| + } |
| + } |
| +#endif |
| + |
| SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); |
| const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); |