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

Unified Diff: chrome/browser/debugger/debugger_contents.cc

Issue 10941: Add mimetypes on the "chrome-resource://" responses.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/debugger_contents.cc
===================================================================
--- chrome/browser/debugger/debugger_contents.cc (revision 5286)
+++ chrome/browser/debugger/debugger_contents.cc (working copy)
@@ -14,6 +14,7 @@
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/resource_bundle.h"
+#include "net/base/mime_util.h"
class DebuggerHTMLSource : public ChromeURLDataManager::DataSource {
public:
@@ -61,6 +62,14 @@
SendResponse(request_id, data_bytes);
}
+ virtual std::string GetMimeType(const std::string& path) const {
+ // Currently but three choices {"", "debugger.js", "debugger.css"}.
+ // Map the extension to mime-type, defaulting to "text/html".
+ std::string mime_type("text/html");
+ net::GetMimeTypeFromFile(ASCIIToWide(path), &mime_type);
+ return mime_type;
+ }
+
private:
DISALLOW_EVIL_CONSTRUCTORS(DebuggerHTMLSource);
};
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698