summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index d7c14fc..4c8226e 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -65,7 +65,6 @@ using base::TimeDelta;
namespace {
// The paths used for the about pages.
-const char kCachePath[] = "cache";
const char kDnsPath[] = "dns";
const char kHistogramsPath[] = "histograms";
const char kObjectsPath[] = "objects";
@@ -783,6 +782,19 @@ bool WillHandleBrowserAboutURL(GURL* url, Profile* profile) {
return true;
}
+ // Handle rewriting net-internal URLs. This allows us to load
+ // about:net-internal.
+ if (StartsWithASCII(url->spec(), chrome::kAboutNetInternalURL, true)) {
+ // Create a mapping from about:net-internal to the view-net-internal:
+ // internal URL.
+ std::string path;
+ size_t split = url->spec().find('/');
+ if (split != std::string::npos)
+ path = url->spec().substr(split + 1);
+ *url = GURL(std::string(chrome::kViewNetInternalScheme) + ":" + path);
+ return true;
+ }
+
// Handle URL to crash the browser process.
if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBrowserCrash)) {
// Induce an intentional crash in the browser process.