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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 595993002: Only quit or restart with chrome:// or about:. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inducebrowsercrashforrealz Created 6 years, 3 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 | content/browser/frame_host/debug_urls.cc » ('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 c7479866544a270455b0346bdaaeb3a16fe49a4a..ab30de49bf8ed498d7aebbefe9589d7af7b6dbfa 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -89,15 +89,15 @@ bool WillHandleBrowserAboutURL(GURL* url,
}
bool HandleNonNavigationAboutURL(const GURL& url) {
- const std::string host(url.host());
+ const std::string spec(url.spec());
- if (host == chrome::kChromeUIRestartHost) {
+ if (LowerCaseEqualsASCII(spec, chrome::kChromeUIRestartURL)) {
// Call AttemptRestart after chrome::Navigate() completes to avoid access of
// gtk objects after they are destroyed by BrowserWindowGtk::Close().
base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&chrome::AttemptRestart));
return true;
- } else if (host == chrome::kChromeUIQuitHost) {
+ } else if (LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) {
base::MessageLoop::current()->PostTask(FROM_HERE,
base::Bind(&chrome::AttemptExit));
return true;
@@ -107,7 +107,7 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
#if !defined(OFFICIAL_BUILD)
#if (defined(OS_MACOSX) || defined(OS_WIN)) && defined(IPC_MESSAGE_LOG_ENABLED)
- if (LowerCaseEqualsASCII(url.spec(), chrome::kChromeUIIPCURL)) {
+ if (LowerCaseEqualsASCII(spec, chrome::kChromeUIIPCURL)) {
// Run the dialog. This will re-use the existing one if it's already up.
chrome::ShowAboutIPCDialog();
return true;
« no previous file with comments | « no previous file | content/browser/frame_host/debug_urls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698