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

Unified Diff: chrome/browser/ui/webui/devtools_ui.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup and improve patch. Created 9 years, 7 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
Index: chrome/browser/ui/webui/devtools_ui.cc
diff --git a/chrome/browser/ui/webui/devtools_ui.cc b/chrome/browser/ui/webui/devtools_ui.cc
index 4782c53225d24a8d7a8ec3bbe68798c0c5f5a186..4b4e5f2d60a15ad8ba151638f613201fa5b01c96 100644
--- a/chrome/browser/ui/webui/devtools_ui.cc
+++ b/chrome/browser/ui/webui/devtools_ui.cc
@@ -47,6 +47,11 @@ DevToolsDataSource::DevToolsDataSource()
void DevToolsDataSource::StartDataRequest(const std::string& path,
bool is_incognito,
int request_id) {
+ if (path.empty()) {
+ SendResponse(request_id, NULL);
+ return;
+ }
+
std::string filename = PathWithoutParams(path);
int resource_id = -1;
@@ -79,7 +84,6 @@ std::string DevToolsDataSource::GetMimeType(const std::string& path) const {
} else if (EndsWith(filename, ".gif", false)) {
return "image/gif";
}
- NOTREACHED();
return "text/plain";
}

Powered by Google App Engine
This is Rietveld 408576698