summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/net_internals_ui.cc
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:13:56 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-10 23:13:56 +0000
commit6e76d8d105739f3b40274dd0247a75ea44e46a89 (patch)
treed3b8ba9605783f4ef28cfe2726b9c38b0e57eb23 /chrome/browser/dom_ui/net_internals_ui.cc
parent02e7a01ff83e7e6aa637809ca43cff5da5dbe1c0 (diff)
downloadchromium_src-6e76d8d105739f3b40274dd0247a75ea44e46a89.zip
chromium_src-6e76d8d105739f3b40274dd0247a75ea44e46a89.tar.gz
chromium_src-6e76d8d105739f3b40274dd0247a75ea44e46a89.tar.bz2
Replace about:net-internals with the javascript-based frontend.
(DNS request tracing is the only feature lost in this transition; it needs to be added back under the new framework). BUG=37421 Review URL: http://codereview.chromium.org/2008007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/net_internals_ui.cc')
-rw-r--r--chrome/browser/dom_ui/net_internals_ui.cc25
1 files changed, 22 insertions, 3 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc
index 80281ea..8ddad85 100644
--- a/chrome/browser/dom_ui/net_internals_ui.cc
+++ b/chrome/browser/dom_ui/net_internals_ui.cc
@@ -323,9 +323,28 @@ void NetInternalsHTMLSource::StartDataRequest(const std::string& path,
if (!file_util::ReadFileToString(file_path, &data_string)) {
LOG(WARNING) << "Could not read resource: " << file_path.value();
- data_string = StringPrintf(
- "Failed to read file RESOURCES/net_internals/%s",
- filename.c_str());
+ data_string = StringPrintf("<p style='color:red'>Failed to read file "
+ "RESOURCES/net_internals/%s</p>",
+ EscapeForHTML(filename).c_str());
+
+ // During the transition from old implementation to new implementation,
+ // users may be entering the URLs for the old frontend.
+ data_string.append(
+ "<p>Note that the URL scheme for net-internals has changed because of "
+ "its new implementation (bug 37421):</p>"
+ "<ul>"
+ "<li>chrome://net-internals/proxyservice.* &rarr; "
+ "<a href='chrome://net-internals#proxy'>chrome://net-internals#proxy"
+ "</a></li>"
+ "<li>chrome://net-internals/hostresolver.* &rarr; <a href='chrome://net"
+ "-internals#dns'>chrome://net-internals#dns</a></li>"
+ "<li>chrome://net-internals/urlrequest.* &rarr; <a href='chrome://net-"
+ "internals#requests'>chrome://net-internals#requests</a></li>"
+ "<li>chrome://net-internals/ (overview for copy-pasting) &rarr; <a href"
+ "='chrome://net-internals#data'>chrome://net-internals#data</a></li>"
+ "<li>chrome://net-internals/view-cache/* &rarr; <a href="
+ "'chrome://view-http-cache'>chrome://view-http-cache</a></li>"
+ "</ul>");
}
scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes);