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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 16745008: chrome://restart implemented. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: PostTask to AttemptRestart 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 | « no previous file | 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/browser_about_handler.cc
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 07a85fb6a34de635a4ead7ad4acadd003d4069c8..22c4f928ea2719014f9a928a4bbcd86ec36bf635 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/memory/singleton.h"
#include "base/strings/string_util.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/common/chrome_switches.h"
@@ -160,6 +161,11 @@ bool WillHandleBrowserAboutURL(GURL* url,
} else if (host == chrome::kChromeUIHelpHost) {
host = chrome::kChromeUIUberHost;
path = chrome::kChromeUIHelpHost + url->path();
+ } else if (host == chrome::kChromeUIRestartHost) {
+ // Call AttemptRestart after chrome::Navigate() completes to avoid access of
+ // gtk objects after they are destoyed by BrowserWindowGtk::Close().
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(&chrome::AttemptRestart));
}
GURL::Replacements replacements;
replacements.SetHostStr(host);
« no previous file with comments | « no previous file | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698