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

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

Issue 7273038: ChromeOs: Call BrowserList::SessionEnding when shutting down via SIGTERM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 6 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
Index: chrome/browser/ui/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index cc536f1611d7e51c4c8f9d4100440910231c54ec..73e28191a153dce3619a1d8e8d906315e2afed54 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -10,6 +10,7 @@
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
+#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/printing/background_printing_manager.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -255,7 +256,7 @@ void BrowserList::AddBrowser(Browser* browser) {
}
// static
-void BrowserList::MarkAsCleanShutdown() {
+void BrowserList::MarkAsCleanShutdownInUserProfiles() {
for (const_iterator i = begin(); i != end(); ++i) {
(*i)->profile()->MarkAsCleanShutdown();
}
@@ -282,7 +283,6 @@ void BrowserList::AttemptExitInternal() {
void BrowserList::NotifyAndTerminate(bool fast_path) {
#if defined(OS_CHROMEOS)
if (!signout) return;
jar (doing other things) 2011/06/29 04:00:09 style nit: put return on next line, to be more con
- NotifyWindowManagerAboutSignout();
#endif
if (fast_path) {
@@ -292,6 +292,7 @@ void BrowserList::NotifyAndTerminate(bool fast_path) {
}
#if defined(OS_CHROMEOS)
+ NotifyWindowManagerAboutSignout();
chromeos::CrosLibrary* cros_library = chromeos::CrosLibrary::Get();
if (cros_library->EnsureLoaded()) {
// If update has been installed, reboot, otherwise, sign out.
@@ -439,9 +440,8 @@ void BrowserList::AttemptUserExit() {
state->ScheduleSavePersistentPrefs();
}
}
- if (FastShutdown()) {
+ if (FastShutdown())
return;
- }
#else
// Reset the restart bit that might have been set in cancelled restart
// request.
@@ -469,11 +469,11 @@ void BrowserList::AttemptRestart() {
// static
void BrowserList::AttemptExit() {
// If we know that all browsers can be closed without blocking,
- // don't notify users of crashes beyond this point.
- // Note that MarkAsCleanShutdown does not set UMA's exit cleanly bit
- // so crashes during shutdown are still reported in UMA.
+ // don't notify users of crashes beyond this point. Note that
+ // MarkAsCleanShutdownInUserProfiles does not set UMA's exit cleanly
+ // bit so crashes during shutdown are still reported in UMA.
if (AreAllBrowsersCloseable())
- MarkAsCleanShutdown();
+ MarkAsCleanShutdownInUserProfiles();
AttemptExitInternal();
}
@@ -481,7 +481,12 @@ void BrowserList::AttemptExit() {
// static
void BrowserList::ExitCleanly() {
// We always mark exit cleanly.
- MarkAsCleanShutdown();
+ MarkAsCleanShutdownInUserProfiles();
+ // Don't report UMA crash beyond this point. SessionManager may kill
+ // chrome after this point.
+ MetricsService* metrics = g_browser_process->metrics_service();
+ if (metrics)
+ metrics->LogCleanShutdown();
AttemptExitInternal();
}
#endif
« chrome/browser/metrics/metrics_service.cc ('K') | « chrome/browser/ui/browser_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698