| Index: chrome/browser/lifetime/application_lifetime.cc
|
| diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
|
| index ddac0049acc86145e0d090d0bf48d5395a7acfc3..c7d4fb9ec6990ddca6c611a013893c68ddc0be6f 100644
|
| --- a/chrome/browser/lifetime/application_lifetime.cc
|
| +++ b/chrome/browser/lifetime/application_lifetime.cc
|
| @@ -48,6 +48,7 @@
|
|
|
| #if defined(OS_WIN)
|
| #include "base/win/win_util.h"
|
| +#include "components/browser_watcher/exit_funnel.h"
|
| #endif
|
|
|
| namespace chrome {
|
| @@ -251,6 +252,11 @@ void ExitCleanly() {
|
| #endif
|
|
|
| void SessionEnding() {
|
| +#if defined(OS_WIN)
|
| + browser_watcher::ExitFunnel funnel(kBrowserExitCodesRegistryPath,
|
| + base::GetCurrentProcessHandle());
|
| + funnel.RecordEvent(L"SessionEnding");
|
| +#endif
|
| // This is a time-limited shutdown where we need to write as much to
|
| // disk as we can as soon as we can, and where we must kill the
|
| // process within a hang timeout to avoid user prompts.
|
| @@ -276,6 +282,9 @@ void SessionEnding() {
|
| content::NotificationService::AllSources(),
|
| content::NotificationService::NoDetails());
|
|
|
| +#if defined(OS_WIN)
|
| + funnel.RecordEvent(L"EndSession");
|
| +#endif
|
| // Write important data first.
|
| g_browser_process->EndSession();
|
|
|
| @@ -283,6 +292,12 @@ void SessionEnding() {
|
| base::win::SetShouldCrashOnProcessDetach(false);
|
| #endif
|
|
|
| +#if defined(OS_WIN)
|
| + // KillProcess ought to terminate the process without further ado, so if
|
| + // execution gets to this point, presumably this is normal exit.
|
| + funnel.RecordEvent(L"KillProcess");
|
| +#endif
|
| +
|
| // On Windows 7 and later, the system will consider the process ripe for
|
| // termination as soon as it hides or destroys its windows. Since any
|
| // execution past that point will be non-deterministically cut short, we
|
|
|