diff options
Diffstat (limited to 'chrome/browser/browser_url_handler.cc')
-rw-r--r-- | chrome/browser/browser_url_handler.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/browser_url_handler.cc b/chrome/browser/browser_url_handler.cc index 17f6fda..a8a96e2 100644 --- a/chrome/browser/browser_url_handler.cc +++ b/chrome/browser/browser_url_handler.cc @@ -43,10 +43,20 @@ static bool HandleViewSource(GURL* url, Profile* profile) { 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; } |