Don't set exit_cleanly bit early if shutdown can be canceled.
Cleanups:
 Added Browser::Restart.
 Moved code around to reduce if/defs.
 Updated the comment of APP_EXITING to emphasize the difference from APP_TERMINATING.

Review URL: http://codereview.chromium.org/7129027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90839 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 43e90b2..4aefc4eeb9 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -1126,7 +1126,7 @@
   }
 
   DLOG(WARNING) << "Shutting down current instance of the browser.";
-  BrowserList::CloseAllBrowsersAndExit();
+  BrowserList::AttemptExit();
 
   // Transfer ownership to Upgrade.
   upgrade_util::SetNewCommandLine(new_cl.release());