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

Unified Diff: chrome/browser/browser_url_handler.cc

Issue 363019: Fixes navigations chrome-internal: to actually show the NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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.cc ('k') | chrome/browser/dom_ui/new_tab_ui_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_url_handler.cc
===================================================================
--- chrome/browser/browser_url_handler.cc (revision 30048)
+++ chrome/browser/browser_url_handler.cc (working copy)
@@ -22,10 +22,20 @@
return false;
}
-// Handles URLs for DOM UI. These URLs need no rewriting.
+// Handles rewriting DOM UI URLs.
static bool HandleDOMUI(GURL* url, Profile* profile) {
if (!DOMUIFactory::UseDOMUIForURL(*url))
return false;
+
+ // Special case the new tab page. In older versions of Chrome, the new tab
+ // page was hosted at chrome-internal:<blah>. This might be in people's saved
+ // sessions or bookmarks, so we say any URL with that scheme triggers the new
+ // tab page.
+ if (url->SchemeIs(chrome::kChromeInternalScheme)) {
+ // Rewrite it with the proper new tab URL.
+ *url = GURL(chrome::kChromeUINewTabURL);
+ }
+
return true;
}
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/dom_ui/new_tab_ui_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698