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

Unified Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 16745008: chrome://restart implemented. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698