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

Unified Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 2318373003: Record shutdown type UMA (Closed)
Patch Set: Add description Created 4 years, 3 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/browser/browser_shutdown.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/application_lifetime.cc
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index d7d2e58089f28c607e51c4a941908729bf25c8d8..15d701d5981d6c6cee8ae1275e7dde55e0b304dd 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -307,6 +307,13 @@ void SessionEnding() {
browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION);
+ // In a clean shutdown, browser_shutdown::OnShutdownStarting sets
+ // g_shutdown_type, and browser_shutdown::ShutdownPreThreadsStop calls
+ // RecordShutdownInfoPrefs to update the pref with the value. However, here
+ // the process is going to exit without calling ShutdownPreThreadsStop.
+ // Instead, here we call RecordShutdownInfoPrefs to record the shutdown info.
+ browser_shutdown::RecordShutdownInfoPrefs();
+
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
content::NotificationService::AllSources(),
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698