Chromium Code Reviews| Index: chrome/browser/ui/browser_list.cc |
| =================================================================== |
| --- chrome/browser/ui/browser_list.cc (revision 71980) |
| +++ chrome/browser/ui/browser_list.cc (working copy) |
| @@ -183,6 +183,12 @@ |
| << "observer list modified during notification"; |
| } |
| +// static |
| +void BrowserList::MarkAsCleanShutdown() { |
| + for (const_iterator i = begin(); i != end(); ++i) { |
| + (*i)->profile()->MarkAsCleanShutdown(); |
| + } |
| +} |
| // static |
| void BrowserList::NotifyAndTerminate() { |
| @@ -262,8 +268,7 @@ |
| // static |
| bool BrowserList::NeedBeforeUnloadFired() { |
| bool need_before_unload_fired = false; |
| - for (BrowserList::const_iterator i = BrowserList::begin(); |
| - i != BrowserList::end(); ++i) { |
| + for (const_iterator i = begin(); i != end(); ++i) { |
| need_before_unload_fired = need_before_unload_fired || |
| (*i)->TabsNeedBeforeUnloadFired(); |
| } |
| @@ -272,8 +277,7 @@ |
| // static |
| bool BrowserList::PendingDownloads() { |
| - for (BrowserList::const_iterator i = BrowserList::begin(); |
| - i != BrowserList::end(); ++i) { |
| + for (const_iterator i = begin(); i != end(); ++i) { |
| bool normal_downloads_are_present = false; |
| bool incognito_downloads_are_present = false; |
| (*i)->CheckDownloadsInProgress(&normal_downloads_are_present, |
| @@ -354,6 +358,7 @@ |
| // static |
| void BrowserList::CloseAllBrowsersAndExit() { |
| + MarkAsCleanShutdown(); // Don't notify users of crashes beyond this point. |
|
Daniel Erat
2011/01/25 02:29:42
I think you might be missing the fast-shutdown pat
|
| NotificationService::current()->Notify( |
| NotificationType::APP_EXITING, |
| NotificationService::AllSources(), |