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); |
}; |