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

Unified Diff: chrome/browser/browser_about_handler.cc

Issue 173024: Add skeleton for an about:net-internal page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address darin's comment, and sync Created 11 years, 4 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
===================================================================
--- chrome/browser/browser_about_handler.cc (revision 25099)
+++ chrome/browser/browser_about_handler.cc (working copy)
@@ -65,7 +65,6 @@
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 @@
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.
« 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