Chromium Code Reviews| Index: chrome/browser/lifetime/application_lifetime.cc |
| diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc |
| index f0cd3d16dbc2e1d689841afb4fa5bb2954cdf588..db331e2cb6fb1a6dd1ea138e084ef13fd5e1fa99 100644 |
| --- a/chrome/browser/lifetime/application_lifetime.cc |
| +++ b/chrome/browser/lifetime/application_lifetime.cc |
| @@ -176,6 +176,12 @@ void AttemptUserExit() { |
| // The Android implementation is in application_lifetime_android.cc |
| #if !defined(OS_ANDROID) |
| void AttemptRestart() { |
| + // Only accept one restart invocation. |
| + static bool restart_already_requested = false; |
|
sky
2013/06/17 14:55:27
Why do we need this? AttemptExit may not succeed.
scheib
2013/06/17 15:34:23
WillHandleBrowserAboutURL (browser_about_handler.c
|
| + if (restart_already_requested) |
| + return; |
| + restart_already_requested = true; |
| + |
| // TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead? |
| for (chrome::BrowserIterator it; !it.done(); it.Next()) |
| content::BrowserContext::SaveSessionState(it->profile()); |