| 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..26ca489cace128b83cb5fd6a2903a907d394aca1 100644
|
| --- a/chrome/browser/ui/browser_list.cc
|
| +++ b/chrome/browser/ui/browser_list.cc
|
| @@ -255,7 +255,7 @@ void BrowserList::AddBrowser(Browser* browser) {
|
| }
|
|
|
| // static
|
| -void BrowserList::MarkAsCleanShutdown() {
|
| +void BrowserList::MarkAsCleanShutdownInUserProfiles() {
|
| for (const_iterator i = begin(); i != end(); ++i) {
|
| (*i)->profile()->MarkAsCleanShutdown();
|
| }
|
| @@ -281,8 +281,8 @@ void BrowserList::AttemptExitInternal() {
|
| // static
|
| void BrowserList::NotifyAndTerminate(bool fast_path) {
|
| #if defined(OS_CHROMEOS)
|
| - if (!signout) return;
|
| - NotifyWindowManagerAboutSignout();
|
| + if (!signout)
|
| + return;
|
| #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.
|
| @@ -436,12 +437,11 @@ void BrowserList::AttemptUserExit() {
|
| state->GetString(prefs::kApplicationLocale) != owner_locale &&
|
| !state->IsManagedPreference(prefs::kApplicationLocale)) {
|
| state->SetString(prefs::kApplicationLocale, owner_locale);
|
| - state->ScheduleSavePersistentPrefs();
|
| + state->SavePersistentPrefs();
|
| }
|
| }
|
| - if (FastShutdown()) {
|
| + if (FastShutdown())
|
| return;
|
| - }
|
| #else
|
| // Reset the restart bit that might have been set in cancelled restart
|
| // request.
|
| @@ -469,22 +469,13 @@ 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();
|
| - AttemptExitInternal();
|
| -}
|
| -
|
| -#if defined(OS_CHROMEOS)
|
| -// static
|
| -void BrowserList::ExitCleanly() {
|
| - // We always mark exit cleanly.
|
| - MarkAsCleanShutdown();
|
| + MarkAsCleanShutdownInUserProfiles();
|
| AttemptExitInternal();
|
| }
|
| -#endif
|
|
|
| // static
|
| void BrowserList::SessionEnding() {
|
|
|