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

Unified Diff: chrome/browser/ui/browser.cc

Issue 796963002: Instrument some of the exit paths likely to suffer hangs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@end_session_instrument
Patch Set: Add instrumentation for browser exit, plus now actually compiles Created 6 years 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/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 502f8331f0e2c4101d1a620a513f3a148fdb07f6..00768de0876681d12d5617185323c81ca3a251b7 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -201,6 +201,7 @@
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/ui/view_ids.h"
#include "components/autofill/core/browser/autofill_ie_toolbar_import_win.h"
+#include "components/browser_watcher/exit_funnel_win.h"
#include "ui/base/touch/touch_device.h"
#include "ui/base/win/shell.h"
#endif // OS_WIN
@@ -658,8 +659,13 @@ void Browser::OnWindowClosing() {
bool should_quit_if_last_browser =
browser_shutdown::IsTryingToQuit() || !chrome::WillKeepAlive();
- if (should_quit_if_last_browser && chrome::ShouldStartShutdown(this))
+ if (should_quit_if_last_browser && chrome::ShouldStartShutdown(this)) {
+#if defined(OS_WIN)
+ browser_watcher::ExitFunnel::RecordSingleEvent(
+ chrome::kBrowserExitCodesRegistryPath, L"LastWindowClose");
+#endif
browser_shutdown::OnShutdownStarting(browser_shutdown::WINDOW_CLOSE);
+ }
// Don't use GetForProfileIfExisting here, we want to force creation of the
// session service so that user can restore what was open.

Powered by Google App Engine
This is Rietveld 408576698